HomeDev GuideRecipesAPI ReferenceGraphQL
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


In the Optimizely Search & Navigation admin view, administrators can set a relative weight of different properties (title, content, summary, or attached document content) via the [Unified Search](🔗) object. The default property weight, 1, does not affect the score. A weight above 1 boosts the score if the information is found in a corresponding property. A weight smaller than 1 reduces the score.

## UnifiedSearchFor weight value

The `IClient` `UnifiedSearchFor` extension method is in the `EPiServer.Find` namespace and enables search using administrator-defined weight values. For example, searching for _Beethoven_ with weights:



Searching for _Beethoven_ with weights and _Swedish_ applied for stemming:



In addition, `UnifiedSearchFor` extension methods for `IClient` (in the `EPiServer.Find.Cms` namespace) take a search query as a parameter. The language used for stemming is selected automatically (based on `EPiServer.Globalization.ContentLanguage.PreferredCulture`), and the culture for stemming mappings is defined in the **episerver.find** section in _app.config/web.config_. The following sample searches for _Beethoven_ with weights and the automatically-selected stemming language.



## UsingUnifiedWeights weight value

Another option is to use the `UsingUnifiedWeights` extension method for `IQueriedSearch` from `EPiServer.Find` namespace. The following example shows how to search for _Beethoven_ with weights and _English_ applied for stemming:



The `UsingUnifiedWeights` extension method takes a `UnifiedWeightsValues` parameter, which lets you specify weights when searching. Here is a sample of searching for _Beethoven_ with specific weights and _English_ applied for stemming:



In the above sample, hits for which _Beethoven_ appears in the title are the most important and should appear at the top of search results. Hits that contain _Beethoven_ in the body are also boosted, but having _Beethoven_ in an attached document's content is less important.