miob Posted October 25, 2007 Share Posted October 25, 2007 i have these varchar items: brand, model, type, accessories, note if someone puts to search string "Alfa Romeo 156 1.9 JTD" i want to search in item brand for "Alfa romeo", in model for "156" in type for "1.9 JTD" this is okay, i can do that with LIKE, but problem occurs when i want also try to search in type for this "Alfa Romeo 156 1.9 JTD" and also try in note for same like in accessories.. as i figured i can't mix LIKE with fulltext index. tried LIKE '%Alfa Romeo%' but this avoids indexes how i could adjuct this one WHERE MATCH (brand,model,title) AGAINST ('Alfa Romeo 156 1.9 JPD'); i wanna list only (brand LIKE "Alfa")AND(model LIKE '156')AND(type like '1.9 JTD') if i combine this abowe with fulltext query it avoids Indexes and make huge load on server i have no clue how to make it working, and what columns to index. thanx for help Quote Link to comment https://forums.phpfreaks.com/topic/74785-advanced-query-fulltext-help-need-expert/ Share on other sites More sharing options...
fenway Posted October 25, 2007 Share Posted October 25, 2007 Fulltext doesn't do numbers very well. Quote Link to comment https://forums.phpfreaks.com/topic/74785-advanced-query-fulltext-help-need-expert/#findComment-378113 Share on other sites More sharing options...
miob Posted October 25, 2007 Author Share Posted October 25, 2007 so there is no way to combine FULLTEXT with LIKE '' ?? i use in LIKE '%%' and i don't think this is good for server resources... Quote Link to comment https://forums.phpfreaks.com/topic/74785-advanced-query-fulltext-help-need-expert/#findComment-378141 Share on other sites More sharing options...
fenway Posted October 26, 2007 Share Posted October 26, 2007 so there is no way to combine FULLTEXT with LIKE '' ?? i use in LIKE '%%' and i don't think this is good for server resources... Sort of... you can run a fulltext query first, and then use those results as the input for the LIKE. Quote Link to comment https://forums.phpfreaks.com/topic/74785-advanced-query-fulltext-help-need-expert/#findComment-378596 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.