Search results not yet reliable
Hi there,
I'm using the "Any word" search mode with loose_ends="yes" and a minimal word length of 2, because I need my clients to find technical product names, which often end in "MK-II", "CE" or just plain numbers.
Now, it seems that the hit ratio of my searches is quite unpredictable.
Example 1:
Search for product entry name "Nordost Tyr 2":
search term "nordost" - entry found
search term "nordost tyr" - entry not found
search term "nordost tyr 2" - entry found
search term "tyr" - entry not found
search term "tyr 2" - entry found
Example 2:
Search for product entry name "Chario Hiper 3000 CE":
search term "chario" - entry found
search term "hiper" - entry found
search term "3000" - entry not found
search term "ce" - entry not found
search term "chario hiper" - entry found
search term "hiper 3000" - entry found
search term "chario hiper 3000" - entry found
search term "chario hiper 3000 ce" - entry not found
See, I have no problem if "ce" is not found, cause it's too broad a term anyway, but why does the exact title not return anything?
First I thought it might depend on the word length, but then again "tyr 2" is found while "nordost tyr" is not.
My titles are a combination of the title field - for the model - and a custom field - for the brand. Right now, both have a weight of 3, but I also tried to give one a weight of 2.
Can you see a pattern here or anything else to solve this?
Replies
Heiko 21 Jul 2012 06:23
Alright, I set the minimum word length to 4 again and now it seems to be working! Should have googled the parameter before... :P
Thanks anyway! :D
Low 21 Jul 2012 08:18
To explain: the minimum word length is used by the MySQL fulltext algorithm. It's a setting that belongs to the actual MySQL installation and cannot be changed at will, but is set upon installation of MySQL itself.
If a fulltext search is fired with a keyword below that threshold, it could return no results, as that word is not indexed.
To avoid that, I execute an alternative search method when the keywords contain any words below the threshold, avoiding no_results. It does mean, that you need to keep that minimal word length setting to its original setting.
Heiko 21 Jul 2012 13:19
Awesome explanation! Thanks again! Now everything works as expected... :)
BUT, why do implement this option in the first place, when you "need to keep that minimal word length setting to its original setting."?!