Hi David,
Hope all is well.
I've implemented the mod to search both title and description. It all works as expected for long queries.
However, short queries are giving me a bit of jip.
Searching for milk using the code in search.php produces the query:
SELECT * , MIN( price ) AS minPrice, MAX( price ) AS maxPrice, COUNT( id ) AS numMerchants, MATCH (name,description) AGAINST ('Milk') AS relevance FROM `products` WHERE MATCH (name,description) AGAINST ('Milk') GROUP BY name ORDER BY relevance DESC LIMIT 0,10
This yields no results but a quick search in the db finds plenty of results:
SELECT * FROM `products` WHERE `description` LIKE '%Milk%'
The latter query finds 12 results but the first finds nothing.
Any ideas on why the first search wouldn't pick up the results?
Thanks!
David,
I added a few more feeds last night and nothing had changed.
On your advice I re-imported them all this morning and hey presto, it works.
Thanks!
Dave
Hi Dave,
Have you re-imported all feeds since creating the full text index on name + description?
There is the 50% rule that can cause strange effects at the start when only one or two feeds have been imported (any word appearing in > 50% of records is not indexed)...
Cheers,
David.