Jump to content

Advanced query fulltext help - need expert !


miob

Recommended Posts

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

 

Link to comment
https://forums.phpfreaks.com/topic/74785-advanced-query-fulltext-help-need-expert/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.