Class Highlight
Assembly: OpenSearch.Client.dll
Syntax
public class Highlight : IHighlight
Properties
|
Edit this page
View Source
BoundaryChars
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.
Declaration
public string BoundaryChars { get; set; }
Property Value
|
Edit this page
View Source
BoundaryMaxScan
Controls how far to look for boundary characters. Defaults to 20.
Declaration
public int? BoundaryMaxScan { get; set; }
Property Value
|
Edit this page
View Source
BoundaryScanner
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
Declaration
public BoundaryScanner? BoundaryScanner { get; set; }
Property Value
|
Edit this page
View Source
BoundaryScannerLocale
You can further specify boundary_scanner_locale to control which Locale is used to search the text for these boundaries.
Declaration
public string BoundaryScannerLocale { get; set; }
Property Value
|
Edit this page
View Source
Encoder
Define how highlighted text will be encoded.
It can be either default (no encoding) or html (will escape html, if you use html highlighting tags).
Declaration
public HighlighterEncoder? Encoder { get; set; }
Property Value
|
Edit this page
View Source
Fields
Declaration
public Dictionary<Field, IHighlightField> Fields { get; set; }
Property Value
|
Edit this page
View Source
FragmentOffset
Controls the margin to start highlighting from when using the fast vector highlighter
Declaration
public int? FragmentOffset { get; set; }
Property Value
|
Edit this page
View Source
FragmentSize
The size of the highlighted fragment, in characters. Defaults to 100
Declaration
public int? FragmentSize { get; set; }
Property Value
|
Edit this page
View Source
Fragmenter
Fragmenter can control how text should be broken up in highlight snippets. However, this option is
applicable only for the Plain Highlighter
Declaration
public HighlighterFragmenter? Fragmenter { get; set; }
Property Value
|
Edit this page
View Source
HighlightQuery
The query to use for highlighting
Declaration
public QueryContainer HighlightQuery { get; set; }
Property Value
|
Edit this page
View Source
MaxAnalyzerOffset
If this setting is set to a non-negative value, the highlighting stops at this defined maximum limit, and the
rest of the text is not processed, thus not highlighted and no error is returned.
Declaration
public int? MaxAnalyzerOffset { get; set; }
Property Value
|
Edit this page
View Source
MaxFragmentLength
Declaration
public int? MaxFragmentLength { get; set; }
Property Value
|
Edit this page
View Source
NoMatchSize
In the case where there is no matching fragment to highlight, the default is to not return anything. Instead, we can return a snippet of
text from
the beginning of the field by setting no_match_size (default 0) to the length of the text that you want returned. The actual length may be
shorter or longer than specified as it tries to break on a word boundary.
Declaration
public int? NoMatchSize { get; set; }
Property Value
|
Edit this page
View Source
NumberOfFragments
The maximum number of fragments to return. Defaults to 5.
Declaration
public int? NumberOfFragments { get; set; }
Property Value
|
Edit this page
View Source
Order
The order in which highlighted fragments are sorted
Declaration
public HighlighterOrder? Order { get; set; }
Property Value
|
Edit this page
View Source
PostTags
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.
Declaration
public IEnumerable<string> PostTags { get; set; }
Property Value
|
Edit this page
View Source
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.
Declaration
public IEnumerable<string> PreTags { get; set; }
Property Value
|
Edit this page
View Source
RequireFieldMatch
Use a specific "tag" schemas.
Declaration
public bool? RequireFieldMatch { get; set; }
Property Value
|
Edit this page
View Source
Use a specific "tag" schemas.
Declaration
public HighlighterTagsSchema? TagsSchema { get; set; }
Property Value
Methods
|
Edit this page
View Source
Field(Field)
Declaration
public static Highlight Field(Field field)
Parameters
Type |
Name |
Description |
Field |
field |
|
Returns
Implements
Extension Methods