Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Minimum score of returned item

Vote:
 

Hi.

I was unable to find any information on how to do this, or if it is even possible.

Anyway. Given the query FindClient.UnifiedSearchFor("Christmas tree") you could expect results containing "christmas", "tree", and possibly even "christ". They all receive different scores based on how good the match was. So if i have content explicitly about christmas trees it would receive a great score and end up at the top of the search. A page about "Our lord Jesus Christ" will receive less and end up further down the result set.

Lets say the best match got a score of 6, and the worst match got a score of 0.1. What I would want to be able to do is to tell my query that i want no hits worse than .5 in score difference compared to the best hit. Or at the very least. I want no hits with less than a score of 1. How would I go about doing this?

My real life problem is that when we search our site for a person, that person shows up on the top. But that persons name is comprised of words and part of words that match totally irrelevant article content which will also show up without having any real relevance to the person the user searched for.

//Martin

#171842
Nov 18, 2016 13:52
Vote:
 

Bump

#172417
Dec 02, 2016 11:13
Vote:
 

Hi Martin,

Could you please share one or two real life search queries in detail and any irrelevant article content?

#173617
Jan 03, 2017 16:17
Vote:
 

I was thinking something along the lines of what Elastic Search says here...

https://www.elastic.co/guide/en/elasticsearch/reference/5.0/search-request-min-score.html

#180989
Aug 04, 2017 10:39
Vote:
 

I found it...

public static ITypeSearch<T> WithMinScore<T>(this ITypeSearch<T> query, double minScore)
{
     return new Search<T, IQuery>(query, context => context.RequestBody.MinScore = minScore);
}



#181604
Aug 25, 2017 9:44
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.