Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class BaseFragListBuilder

    A abstract implementation of IFragListBuilder.

    Inheritance
    object
    BaseFragListBuilder
    SimpleFragListBuilder
    WeightedFragListBuilder
    Implements
    IFragListBuilder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search.VectorHighlight
    Assembly: Lucene.Net.Highlighter.dll
    Syntax
    public abstract class BaseFragListBuilder : IFragListBuilder

    Constructors

    BaseFragListBuilder()

    A abstract implementation of IFragListBuilder.

    Declaration
    protected BaseFragListBuilder()

    BaseFragListBuilder(int)

    A abstract implementation of IFragListBuilder.

    Declaration
    protected BaseFragListBuilder(int margin)
    Parameters
    Type Name Description
    int margin

    Fields

    MARGIN_DEFAULT

    A abstract implementation of IFragListBuilder.

    Declaration
    public static readonly int MARGIN_DEFAULT
    Field Value
    Type Description
    int

    MIN_FRAG_CHAR_SIZE_FACTOR

    A abstract implementation of IFragListBuilder.

    Declaration
    public static readonly int MIN_FRAG_CHAR_SIZE_FACTOR
    Field Value
    Type Description
    int

    Methods

    AcceptPhrase(WeightedPhraseInfo, int, int)

    A predicate to decide if the given FieldPhraseList.WeightedPhraseInfo should be accepted as a highlighted phrase or if it should be discarded.

    The default implementation discards phrases that are composed of more than one term and where the matchLength exceeds the fragment character size.
    Declaration
    protected virtual bool AcceptPhrase(FieldPhraseList.WeightedPhraseInfo info, int matchLength, int fragCharSize)
    Parameters
    Type Name Description
    FieldPhraseList.WeightedPhraseInfo info

    the phrase info to accept

    int matchLength

    the match length of the current phrase

    int fragCharSize

    the configured fragment character size

    Returns
    Type Description
    bool

    true if this phrase info should be accepted as a highligh phrase

    CreateFieldFragList(FieldPhraseList, FieldFragList, int)

    A abstract implementation of IFragListBuilder.

    Declaration
    protected virtual FieldFragList CreateFieldFragList(FieldPhraseList fieldPhraseList, FieldFragList fieldFragList, int fragCharSize)
    Parameters
    Type Name Description
    FieldPhraseList fieldPhraseList
    FieldFragList fieldFragList
    int fragCharSize
    Returns
    Type Description
    FieldFragList

    CreateFieldFragList(FieldPhraseList, int)

    create a FieldFragList.

    Declaration
    public abstract FieldFragList CreateFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize)
    Parameters
    Type Name Description
    FieldPhraseList fieldPhraseList

    FieldPhraseList object

    int fragCharSize

    the length (number of chars) of a fragment

    Returns
    Type Description
    FieldFragList

    the created FieldFragList object

    Implements

    IFragListBuilder
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.