I am running a SQL Query as follows:
SELECT a.id as id,a.name as name , a.price as price , a.saleprice as saleprice, a.images as images, a.slug as slug,a.hover_name as hover_name, MATCH (a.name) AGAINST ('+"blue cushion"') AS title_relevance FROM gc_products a WHERE ( ( ( MATCH (a.name) AGAINST ('+"blue cushion"') ) OR (a.sku like '%blue cushion%') ) and (a.enabled=1) ) ORDER BY title_relevance DESC
But It is giving me wrong results it is also showing me records where name is like "blue candle" , "red cushion"
I have also tried
MATCH (a.name) AGAINST ('blue cushion')
MATCH (a.name) AGAINST ('+blue cushion')
MATCH (a.name) AGAINST ('+blue +cushion')
It's not necessary that both the words be together.They can be any where in name but it is necessary that both the words must be there in name. '+' sign means 0 or more while I need at least one time.
But same result coming. I want if there are more than one words to match then it should match all the words in name.
MATCH (a.name) AGAINST ('blue +cushion')