Search Results for

    Show / Hide Table of Contents

    Interface IHighlight

    Namespace: OpenSearch.Client
    Assembly: OpenSearch.Client.dll
    Syntax
    public interface 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
    [DataMember(Name = "boundary_chars")]
    string BoundaryChars { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    BoundaryMaxScan

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

    Declaration
    [DataMember(Name = "boundary_max_scan")]
    int? BoundaryMaxScan { get; set; }
    Property Value
    Type Description
    int?
    | 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
    [DataMember(Name = "boundary_scanner")]
    BoundaryScanner? BoundaryScanner { get; set; }
    Property Value
    Type Description
    BoundaryScanner?
    | 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
    [DataMember(Name = "boundary_scanner_locale")]
    string BoundaryScannerLocale { get; set; }
    Property Value
    Type Description
    string
    | 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
    [DataMember(Name = "encoder")]
    HighlighterEncoder? Encoder { get; set; }
    Property Value
    Type Description
    HighlighterEncoder?
    | Edit this page View Source

    Fields

    Declaration
    [DataMember(Name = "fields")]
    Dictionary<Field, IHighlightField> Fields { get; set; }
    Property Value
    Type Description
    Dictionary<Field, IHighlightField>
    | Edit this page View Source

    FragmentOffset

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

    Declaration
    [DataMember(Name = "fragment_offset")]
    int? FragmentOffset { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    FragmentSize

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

    Declaration
    [DataMember(Name = "fragment_size")]
    int? FragmentSize { get; set; }
    Property Value
    Type Description
    int?
    | 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
    [DataMember(Name = "fragmenter")]
    HighlighterFragmenter? Fragmenter { get; set; }
    Property Value
    Type Description
    HighlighterFragmenter?
    | Edit this page View Source

    HighlightQuery

    The query to use for highlighting

    Declaration
    [DataMember(Name = "highlight_query")]
    QueryContainer HighlightQuery { get; set; }
    Property Value
    Type Description
    QueryContainer
    | 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
    [DataMember(Name = "max_analyzer_offset")]
    int? MaxAnalyzerOffset { get; set; }
    Property Value
    Type Description
    int?
    Remarks

    Introduced in OpenSearch 2.2

    | Edit this page View Source

    MaxFragmentLength

    Declaration
    [DataMember(Name = "max_fragment_length")]
    int? MaxFragmentLength { get; set; }
    Property Value
    Type Description
    int?
    | 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
    [DataMember(Name = "no_match_size")]
    int? NoMatchSize { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    NumberOfFragments

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

    Declaration
    [DataMember(Name = "number_of_fragments")]
    int? NumberOfFragments { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    Order

    The order in which highlighted fragments are sorted

    Declaration
    [DataMember(Name = "order")]
    HighlighterOrder? Order { get; set; }
    Property Value
    Type Description
    HighlighterOrder?
    | 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
    [DataMember(Name = "post_tags")]
    IEnumerable<string> PostTags { get; set; }
    Property Value
    Type Description
    IEnumerable<string>
    | Edit this page View Source

    PreTags

    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
    [DataMember(Name = "pre_tags")]
    IEnumerable<string> PreTags { get; set; }
    Property Value
    Type Description
    IEnumerable<string>
    | Edit this page View Source

    RequireFieldMatch

    Use a specific "tag" schemas.

    Declaration
    [DataMember(Name = "require_field_match")]
    bool? RequireFieldMatch { get; set; }
    Property Value
    Type Description
    bool?
    Remarks

    Currently a single schema called "styled" with the following pre_tags: <em class="hlt1">, <em class="hlt2">, <em class="hlt3">, <em class="hlt4">, <em class="hlt5">, <em class="hlt6">, <em class="hlt7">, <em class="hlt8">, <em class="hlt9">, <em class="hlt10">

    | Edit this page View Source

    TagsSchema

    Use a specific "tag" schemas.

    Declaration
    [DataMember(Name = "tags_schema")]
    HighlighterTagsSchema? TagsSchema { get; set; }
    Property Value
    Type Description
    HighlighterTagsSchema?
    Remarks

    Currently a single schema called "styled" with the following pre_tags: <em class="hlt1">, <em class="hlt2">, <em class="hlt3">, <em class="hlt4">, <em class="hlt5">, <em class="hlt6">, <em class="hlt7">, <em class="hlt8">, <em class="hlt9">, <em class="hlt10">

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • BoundaryChars
      • BoundaryMaxScan
      • BoundaryScanner
      • BoundaryScannerLocale
      • Encoder
      • Fields
      • FragmentOffset
      • FragmentSize
      • Fragmenter
      • HighlightQuery
      • MaxAnalyzerOffset
      • MaxFragmentLength
      • NoMatchSize
      • NumberOfFragments
      • Order
      • PostTags
      • PreTags
      • RequireFieldMatch
      • TagsSchema
    • Extension Methods
    Back to top Generated by DocFX