MySQL Forums
Forum List  »  Full-Text Search

Not getting expected results
Posted by: Hazel Ryan
Date: September 12, 2010 02:11PM

I'm having a problem with the full text searching, it misses so much. If I search for 'test' it happily finds all the pages that still have 'test' as their text but a lot of the real phrases I search for come back with no results, in fact with one particular index (product_text) the only thing I've managed to get results with is 'test'.

(select id, 'pages' as model, match(`text`,name,sub_title,sub_content) against ('test') as relevance from pages where lang='en' having relevance>0)
 union (select id, 'product_categories' as model, match(`text`,name,sub_text,sub_title,catalogue_title) against ('test') as relevance from product_categories where lang='en' having relevance>0) 
union (select id, 'products' as model, match(product_text) against ('test') as relevance from sector_products where lang='en' having relevance>0) 
union (select id, 'sector_products' as model, match(`text`) against ('test') as relevance from sector_products where lang='en' having relevance>0) 
union (select id, 'news' as model, match(title,content) against ('test') as relevance from news where lang='en' having relevance>0) 
order by relevance desc

Options: ReplyQuote


Subject
Views
Written By
Posted
Not getting expected results
3240
September 12, 2010 02:11PM
1697
September 16, 2010 09:45PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.