Search Results for

    Show / Hide Table of Contents

    Class HighlightField

    Inheritance
    object
    HighlightField
    Implements
    IHighlightField
    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 HighlightField : IHighlightField

    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

    Field

    The field on which to perform highlighting.

    Declaration
    public Field Field { get; set; }
    Property Value
    Type Description
    Field
    Remarks

    In order to perform highlighting, the actual content of the field is required. If the field in question is stored (has store set to true in the mapping) it will be used, otherwise, the actual _source will be loaded and the relevant field will be extracted from it.

    | Edit this page View Source

    ForceSource

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

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

    MatchedFields

    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.

    Declaration
    public Fields MatchedFields { get; set; }
    Property Value
    Type Description
    Fields
    | 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

    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.

    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. Only valid for the unified highlighter.

    Declaration
    public HighlighterOrder? Order { get; set; }
    Property Value
    Type Description
    HighlighterOrder?
    | Edit this page View Source

    PhraseLimit

    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.

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

    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.

    Declaration
    public bool? RequireFieldMatch { get; set; }
    Property Value
    Type Description
    bool?
    | 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">

    | Edit this page View Source

    Type

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

    Declaration
    public Union<HighlighterType, string> Type { get; set; }
    Property Value
    Type Description
    Union<HighlighterType, string>

    Implements

    IHighlightField

    Extension Methods

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