By Richard.Dunning - Thu 26 Nov 2015
|
If I search for products using two words I want the standard search to return results were both words exist, the standard search currently returns results were either word exists so I have to go into the Advanced Search and change it to 'All Words' to get the results I require.
I've change the config value frontend.search.defaultmethod to 'All' rather than 'Any' but it has had no effect on the standard search.
I'm using the standard 'Kartris' skin.
Can anyone help!!!!!
|
By Paul - Fri 27 Nov 2015
|
The front end search uses relevance processing, so I think this setting is deprecated (though it isn't marked as such, so we'll look into that). What the present search does is ranks results in order of relevance.
For example, if you search for "foo bar", any records will be found that contain either "foo" or "bar". However a ranking system is then applied so that the most relevant records should rise to the top. Any occurrence of "foo bar" in a record will rank it above others that contain both, which will rank above others that contain just one. This applies for search terms of more than two words as well. Also, the terms featuring in certain fields score higher than others, for example the term in the product name scores higher than a mention in the description.
This should work far better than a simple AND or OR search for several reasons. Firstly, AND searches very often return zero results if you enter multiple words, if there is one word that does not feature, it effectively stops any records from showing. OR searches have the opposite problem, where too many records are returned because just one of the words occurs somewhere.
And in both cases with an AND or OR search, there is no sorting, so records that contain all four words of a search phrase for example, even in the correct order, will not necessarily appear above a record that contains just one of the words.
Our relevance search should work far better, it will nearly always return results (unless none of the words are in any records) and when there are lots of results, the ones near the top should be the best matches.
|
|