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


Unified Search is an Optimizely Content Management System (CMS) integration that lets you index and query objects of existing classes without having to map them to an intermediate type in the index.

You can customize the projection of unified search results in several ways. The `UnifiedSearchRegistry` supports the options described  in the following, see [Unified Search](🔗).

## ProjectTitleFrom

To register the `Title` for a specific document type.



## ProjectTypeNameFrom

To register the `TypeName` for a specific document type.



## ProjectUrlFrom

To register the `URL` for a specific document type.



## ProjectImageUriFrom

To register the `ImageUri` for a specific document type.



## UseHitType

To register the type of the result item for a specific document type.



## ProjectHighlightedExcerptUsing

To register the highlighted excerpt for a specific document type.



## AlwaysApplyFilter

To register a filter always applied for UnifiedSearch.



## PublicSearchFilter

To register a filter always applied for public Unified Search.



## CustomizeProjection

If the other projection options are inadequate, the `CustomizeProjection` extension provides full access to the `HitProjectionBuilder`.

## Highlight and encode unified search results

For unified search results, HTML encoding is enabled by default for "title" and "excerpt" fields. The text is encoded before adding the HTML tags that surround highlighted content.



### Disable HTML encoding

To disable HTML encoding, set the `EncodeTitle` and `EncodeExcerpt` properties of the `HitSpecification` to "false." If you do, ensure that the implementation handles the encoding of results, to ensure normal rendering and avoid script injections. You may also implement custom highlighting.