Hello,
I found something very strange in the search result.
I have test with a search on "Nea" keyword. I have 6 pages of results but product "Nea Blanc" and "Nea Noir" are on page 4 and 5!
On the first page I have "Alterno" "Anneau avec picots et pendentif" etc...
Why product with the exact keyword are ranked after product with keyword in just a part of the name? Is it because "Nea Blanc" and "Nea Noir" are mapped products? How can I make it better?
You can test it here: {link saved}
Thanks for your fast reply, unfortunately It don't change anything :(
Hi Klyde,
Nothing received - can you check the address. I'll also send you an email...
Cheers,
David.
The file you send me give 0 result with the search "Nea" :-(
Hi,
Sorry - I had used the wrong character in the wildcard expression in the SQL. I've sent you another version which should do the trick...!
Cheers,
David.
With this on results are ranked in the same order as the original version.
Hi,
Thanks for the feedback; i'll look into this more for you...
Cheers,
David.
Hi Klyde,
This will probably require some hard coding to handle the specific cases as there will always be situations that exceed the search and indexing capabilities of MySQL.
Could you perhaps email me your latest search.php and a couple of example queries that do not show the products you want to be returned, together with the products that you would like to see in those results...
Cheers,
David.
Hi Klyde,
This is a trade-off i'm afraid; as MySQL's Full Text index does not index words less than 4 characters (for performance reasons); so when the query contains shorter words; a basic LIKE query is used which doesn't have the same relevance sorting i'm afraid.
One option is to change the basic search method (when the full text index is not used) to show only products that contain the exact text (at any position). To do this, in search.php, look for the following code on line 94:
$where = implode(" AND ",$wheres);
...and REPLACE this with:
$where = "search_name LIKE '%".database_safe($parts[0])."%'";
Cheers,
David.