Try our conversational search powered by Generative AI!

Get Unified Weights settings from index



How can I get settings from 'Boosting' tab programatticaly?

Best regards,


Dec 03, 2015 8:58

I think you should be able to access them using:


You can also set them using conventions:

client.Conventions.ForInstancesOf<BlogPost>()   .SetDecayParameters(....)
Dec 04, 2015 8:28

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();
Edited, Dec 04, 2015 9:01

Nice one, @Per Magne! :)

Dec 04, 2015 9:24

Hi Per Magne Skuseth,

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.

Dec 04, 2015 21:43

@Pavel, instead of using UnifiedSearchFor, you could do:

                    .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

Dec 09, 2015 11:01
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.