NEST by Elastic and contributors

<PackageReference Include="NEST" Version="7.4.0" />

.NET API 4,308,480 bytes

 HighlightField

public string BoundaryChars { get; set; }

Defines what constitutes a boundary for highlighting when using the fast vector highlighter. It's a single string with each boundary character defined in it. It defaults to .,!? \t\n.

public int? BoundaryMaxScan { get; set; }

Controls how far to look for boundary characters. Defaults to 20.

public BoundaryScanner? BoundaryScanner { get; set; }

When highlighting a field using the unified highlighter or the fast vector highlighter, you can specify how to break the highlighted fragments using boundary_scanner

public string BoundaryScannerLocale { get; set; }

You can further specify boundary_scanner_locale to control which Locale is used to search the text for these boundaries.

public Field Field { get; set; }

The field on which to perform highlighting.

public bool? ForceSource { get; set; }

Forces the highlighting to highlight fields based on the source even if fields are stored separately.

public HighlighterFragmenter? Fragmenter { get; set; }

Fragmenter can control how text should be broken up in highlight snippets. However, this option is applicable only for the Plain Highlighter

public int? FragmentOffset { get; set; }

Controls the margin to start highlighting from when using the fast vector highlighter

public int? FragmentSize { get; set; }

The size of the highlighted fragment, in characters. Defaults to 100

public QueryContainer HighlightQuery { get; set; }

The query to use for highlighting

public Fields MatchedFields { get; set; }

Combine matches on multiple fields to highlight a single field when using the fast vector highighter. This is most intuitive for multifields that analyze the same string in different ways. All matched fields must have term_vector set to with_positions_offsets, but only the field to which the matches are combined is loaded so only that field would benefit from having store set to yes.

public int? MaxFragmentLength { get; set; }

public int? NoMatchSize { get; set; }

The length of a snippet of text from the beginning of the field to return when no match for highlighting is found. Default behaviour is to not return anything when a match is not found. The actual length may be shorter than specified as it tries to break on a word boundary.

public int? NumberOfFragments { get; set; }

The maximum number of fragments to return. Defaults to 5.

public HighlighterOrder? Order { get; set; }

The order in which highlighted fragments are sorted. Only valid for the unified highlighter.

public int? PhraseLimit { get; set; }

Controls the number of matching phrases in a document that are considered. Prevents the Fvh highlighter from analyzing too many phrases and consuming too much memory. When using matched_fields, PhraseLimit phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by the Fvh highlighter. Defaults to 256.

public IEnumerable<string> PostTags { get; set; }

Controls the post tag in which to wrap highights. By default, the highlighting will wrap highlighted text in <em> and </em>. Using the fast vector highlighter, there can be more tags, and the importance is ordered.

public IEnumerable<string> PreTags { get; set; }

Controls the pre tag in which to wrap highights. By default, the highlighting will wrap highlighted text in <em> and </em>. Using the fast vector highlighter, there can be more tags, and the importance is ordered.

public bool? RequireFieldMatch { get; set; }

Determines if only fields that hold a query match will be highlighted. Set to false will cause any field to be highlighted regardless of whether the query matched specifically on them. Default behaviour is true.

public HighlighterTagsSchema? TagsSchema { get; set; }

Use a specific "tag" schemas.

public Union<HighlighterType, string> Type { get; set; }

The type of highlighter to use. Can be a defined or custom highlighter

public HighlightField()