Hide menu Last updated: Sep 15 2017
Area: Episerver Find Applies to versions: 12 and higher
Other versions:

Customizing default projections

You can customize the projection of unified search results in several ways. The UnifiedSearchRegistry supports these options.

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 UnifiedSearch.

CustomizeProjection

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

Highlighting and encoding 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.

Disabling 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.

Comments