AI OnAI Off
I think you should be able to access them using:
SearchClient.Instance.Conventions.AutoBoostConvention
You can also set them using conventions:
client.Conventions.ForInstancesOf<BlogPost>() .SetDecayParameters(....)
Actually, AutoBoost is used for document age and popularity, and not for the unified weights.
Here is a way to get the unified weights:
var unifiedWeightsQuery = SearchClient.Instance.NewCommand(context => new UnifiedWeightsCommand(context, SearchClient.Instance.DefaultIndex)); UnifiedWeightsItem weights = unifiedWeightsQuery.Execute().Hits.FirstOrDefault();
Thanks for your solution
Is it possible to set weight to another property from UnifiedSearchHit (e.g. Section or Subsection)?
We can setup some values only for SearchTitle, SearchText, SearchSummary and SearchAttachment from UI boosting tab.
@Pavel, instead of using UnifiedSearchFor, you could do:
.UnifiedSearch().For(q) .InField(x => x.SearchSection,2)
and then add additional fields. You can then specify whatever boosting you would like - "2" in this case for SearchSection
Hi,
How can I get settings from 'Boosting' tab programatticaly?
Best regards,
Pavel