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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.