Search Results for

    Show / Hide Table of Contents

    Class Highlight

    Inheritance
    object
    Highlight
    Implements
    IHighlight
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OpenSearch.Client
    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
    Type Description
    string
    | 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
    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
    public 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
    public 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
    public HighlighterEncoder? Encoder { get; set; }
    Property Value
    Type Description
    HighlighterEncoder?
    | Edit this page View Source

    Fields

    Declaration
    public 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
    public 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
    public 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
    public HighlighterFragmenter? Fragmenter { get; set; }
    Property Value
    Type Description
    HighlighterFragmenter?
    | Edit this page View Source

    HighlightQuery

    The query to use for highlighting

    Declaration
    public 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
    public int? MaxAnalyzerOffset { get; set; }
    Property Value
    Type Description
    int?
    Remarks

    Introduced in OpenSearch 2.2

    | Edit this page View Source

    MaxFragmentLength

    Declaration
    public 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
    public 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
    public int? NumberOfFragments { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    Order

    The order in which highlighted fragments are sorted

    Declaration
    public 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
    public 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
    public IEnumerable<string> PreTags { get; set; }
    Property Value
    Type Description
    IEnumerable<string>
    | Edit this page View Source

    RequireFieldMatch

    Use a specific "tag" schemas.

    Declaration
    public 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
    public 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">

    Methods

    | Edit this page View Source

    Field(Field)

    Declaration
    public static Highlight Field(Field field)
    Parameters
    Type Name Description
    Field field
    Returns
    Type Description
    Highlight

    Implements

    IHighlight

    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
    • Methods
      • Field(Field)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX