Why needed item have only 6’th place, instead of first, if it have best relevancy to typed search string?
And why on 3 place there is item, that even don’t have “prod” or “brick-prod” word, not in name or in any other field, and not have any substring match?
Does the search algorithm add some boost to name field, comparing to other fields?
Can anybody please describe, why current ordering of search results so terrible?
The solution:
Solution for this problem can be improving search ordering algorithm, that will order results by those rules:
Boost full word matches first, than part-word.
Boost matches in “Name” field, comparing to other field.
If typed word have hypens (brick-prod in my example) - boost the exact match.
Boost full substring match. And, maybe, also allow to type exact phrase (in quotes) to make full subsrtring search, instead of fulltext search.
Great feedback. In the meantime, we use a library called Lunr to power search.
There are lots of ways to parse data with it, and should be able to achieve the results you’re looking for using some additional parameters. More on advanced search can be found here.
Thanks for the tip, I wasn’t know that this search supports improved operators, great!
But even so - the default search results looks strange (especially my last example when at first place there are item, that even not have “root” word in any field!), maybe they can be tuned-up too for better sorting of results by relevancy? At least, to move results with full match (all of the words) to top?
Maybe some additional system data are also added to Lunr index (maybe some path exactly with “root” word), that give me such wrong results?
I believe the reason for your example result set is because ‘brick’ - one of your first search terms, appears two times in the first object, ranking it higher, but I do understand your point and we have this request captured as search is only going to get more and more important