November Happy Hour will be moved to Thursday December 5th.

Culture and score in EPiServer search

Vote:
 

I am having some trouble with EPiServer search. If I search for multiple words, e.g. "foo bar", I will get the result presented like this:

foo something
foo bar
foo thing

I tried to order by score, but then I saw the score is 0.0 on every hit. I found this blog post: https://world.episerver.com/blogs/Anders-Hattestad/Dates/2016/2/when-episerver.searchs-score-is-zero/, and this resolved the problem, though it's not a good solution.

Then, the scores were like this:

foo something (2.3)
foo bar (0.43)
foo thing (0.40)

Why is "foo something" getting a higher score than "foo bar", which is the exact search term?? 
And is there any better solution for getting the score, than changing the culture?

#187168
Jan 15, 2018 11:07
Vote:
 

https://world.episerver.com/FAQ/Items/Search-algorithm-in-Episerver/
Explains how the algorithm works for Episerver Search.

If I remember correctly, rather than how close words are located it will mainly rank them on amount of uses of a word on the page in relation to every page.
"The total number of occurrences of each word in a page is matched in a search with the total number of times the word is occurring on every page."

I don't remember that language issue, but I think even if the score value doesn't work it will always return the results sorted on rank.
One idea could be to do double searches, one with "foo bar" and one as separate words, not the most beautiful solution.

#187174
Jan 15, 2018 13:25
Vote:
 

Can you wrap your search text in double quotes to see if it changes anything?

#187200
Jan 15, 2018 22:42
Vote:
 

Aniket: Yes, if I do - the only hit I get, is the one that contains the whole search text. But it doesn't really solve the problem. 

#187229
Edited, Jan 16, 2018 13:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.