AI OnAI Off
Hi Jocke
Are you performing any free-text search in your query? I.e. .For(query);
Boosting only has an effect if there is an existing score to boost.
Hi!
I found the answer myself just now! If I have OrderBy() in my statement the Scores are set to null. As soon as I remove the OrderBy all hits will have a score!
Hmm
Maybe you have to do "OrderByRelevance" which is the default.
You could perhaps add
public static ITypeSearch<TSource> OrderByScore<TSource>(this ITypeSearch<TSource> search)
{
return new Search<TSource, IQuery>(search, context =>
context.RequestBody.Sort.Add(new Sorting("_score")));
}
I have a project that uses UnifiedSearch. The result from a search looks OK, but all hits are missing the Score. They all have null value as Score. Is this even possible? I thought all hits always have a score.
I wanted to do some boosting but when the score is null, it's a bit difficult to boost the score.