Episerver find use Boosting with weights and take 3 items sometime return different results

Vote:
 

Hi,

I don't know why Episerver find used Boosting with weights and then take 3 items sometime return different results. I think it should order by weights and result should be consistent

Example:

var itypesearch = ContentDataQueryHandler.Instance.Create()
.Search<Product>()
.ForWithWildcards(searchText, (x => x.Code, 4), (x => x.DisplayName, 3), (x => x.ProductType, 2), (x => x.Brand, 1.5))
.FilterForVisitor(language.Name).ApplyBestBets().UsingAutoBoost().Take(3)

Can somebody clarify to this question?

Regards,

Thang Le

#218926
Edited, Mar 25, 2020 2:59
Vote:
 

Hi Lê Anh

I am not sure order by relevance/score is done on this query by default as you're not using .For().

Is there a difference if you use .OrderByScore() here

public static ITypeSearch<TSource> OrderByScore<TSource>(this ITypeSearch<TSource> search)
{
    return new Search<TSource, IQuery>(search, context =>
    context.RequestBody.Sort.Add(new Sorting("_score")));
}

#220872
Apr 07, 2020 8:14
Vote:
 

Hi dada,

Yes, I am using .For()

Let me try OrderByScore as your suggestion to see what happend next

Regard,

Thang Le

#220873
Apr 07, 2020 8:18
* 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.