Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class BaseFragmentsBuilder

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Inheritance
    object
    BaseFragmentsBuilder
    ScoreOrderFragmentsBuilder
    SimpleFragmentsBuilder
    Implements
    IFragmentsBuilder
    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 BaseFragmentsBuilder : IFragmentsBuilder

    Constructors

    BaseFragmentsBuilder()

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected BaseFragmentsBuilder()

    BaseFragmentsBuilder(IBoundaryScanner)

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected BaseFragmentsBuilder(IBoundaryScanner boundaryScanner)
    Parameters
    Type Name Description
    IBoundaryScanner boundaryScanner

    BaseFragmentsBuilder(string[], string[])

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected BaseFragmentsBuilder(string[] preTags, string[] postTags)
    Parameters
    Type Name Description
    string[] preTags
    string[] postTags

    BaseFragmentsBuilder(string[], string[], IBoundaryScanner)

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected BaseFragmentsBuilder(string[] preTags, string[] postTags, IBoundaryScanner boundaryScanner)
    Parameters
    Type Name Description
    string[] preTags
    string[] postTags
    IBoundaryScanner boundaryScanner

    Fields

    COLORED_POST_TAGS

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    public static readonly string[] COLORED_POST_TAGS
    Field Value
    Type Description
    string[]

    COLORED_PRE_TAGS

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    public static readonly string[] COLORED_PRE_TAGS
    Field Value
    Type Description
    string[]

    m_postTags

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected string[] m_postTags
    Field Value
    Type Description
    string[]

    m_preTags

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected string[] m_preTags
    Field Value
    Type Description
    string[]

    Properties

    IsDiscreteMultiValueHighlighting

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    public virtual bool IsDiscreteMultiValueHighlighting { get; set; }
    Property Value
    Type Description
    bool

    MultiValuedSeparator

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    public virtual char MultiValuedSeparator { get; set; }
    Property Value
    Type Description
    char

    Methods

    CreateFragment(IndexReader, int, string, FieldFragList)

    create a fragment.

    Declaration
    public virtual string CreateFragment(IndexReader reader, int docId, string fieldName, FieldFragList fieldFragList)
    Parameters
    Type Name Description
    IndexReader reader

    Lucene.Net.Index.IndexReader of the index

    int docId

    document id to be highlighted

    string fieldName

    field of the document to be highlighted

    FieldFragList fieldFragList

    FieldFragList object

    Returns
    Type Description
    string

    a created fragment or null when no fragment created

    Exceptions
    Type Condition
    IOException

    If there is a low-level I/O error

    CreateFragment(IndexReader, int, string, FieldFragList, string[], string[], IEncoder)

    create a fragment.

    Declaration
    public virtual string CreateFragment(IndexReader reader, int docId, string fieldName, FieldFragList fieldFragList, string[] preTags, string[] postTags, IEncoder encoder)
    Parameters
    Type Name Description
    IndexReader reader

    Lucene.Net.Index.IndexReader of the index

    int docId

    document id to be highlighted

    string fieldName

    field of the document to be highlighted

    FieldFragList fieldFragList

    FieldFragList object

    string[] preTags

    pre-tags to be used to highlight terms

    string[] postTags

    post-tags to be used to highlight terms

    IEncoder encoder

    an encoder that generates encoded text

    Returns
    Type Description
    string

    a created fragment or null when no fragment created

    Exceptions
    Type Condition
    IOException

    If there is a low-level I/O error

    CreateFragments(IndexReader, int, string, FieldFragList, int)

    create multiple fragments.

    Declaration
    public virtual string[] CreateFragments(IndexReader reader, int docId, string fieldName, FieldFragList fieldFragList, int maxNumFragments)
    Parameters
    Type Name Description
    IndexReader reader

    Lucene.Net.Index.IndexReader of the index

    int docId

    document id to be highlighter

    string fieldName

    field of the document to be highlighted

    FieldFragList fieldFragList

    FieldFragList object

    int maxNumFragments

    maximum number of fragments

    Returns
    Type Description
    string[]

    created fragments or null when no fragments created. size of the array can be less than maxNumFragments

    Exceptions
    Type Condition
    IOException

    If there is a low-level I/O error

    CreateFragments(IndexReader, int, string, FieldFragList, int, string[], string[], IEncoder)

    create multiple fragments.

    Declaration
    public virtual string[] CreateFragments(IndexReader reader, int docId, string fieldName, FieldFragList fieldFragList, int maxNumFragments, string[] preTags, string[] postTags, IEncoder encoder)
    Parameters
    Type Name Description
    IndexReader reader

    Lucene.Net.Index.IndexReader of the index

    int docId

    document id to be highlighter

    string fieldName

    field of the document to be highlighted

    FieldFragList fieldFragList

    FieldFragList object

    int maxNumFragments

    maximum number of fragments

    string[] preTags

    pre-tags to be used to highlight terms

    string[] postTags

    post-tags to be used to highlight terms

    IEncoder encoder

    an encoder that generates encoded text

    Returns
    Type Description
    string[]

    created fragments or null when no fragments created. size of the array can be less than maxNumFragments

    Exceptions
    Type Condition
    IOException

    If there is a low-level I/O error

    DiscreteMultiValueHighlighting(IList<WeightedFragInfo>, Field[])

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected virtual IList<FieldFragList.WeightedFragInfo> DiscreteMultiValueHighlighting(IList<FieldFragList.WeightedFragInfo> fragInfos, Field[] fields)
    Parameters
    Type Name Description
    IList<FieldFragList.WeightedFragInfo> fragInfos
    Field[] fields
    Returns
    Type Description
    IList<FieldFragList.WeightedFragInfo>

    GetFields(IndexReader, int, string)

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected virtual Field[] GetFields(IndexReader reader, int docId, string fieldName)
    Parameters
    Type Name Description
    IndexReader reader
    int docId
    string fieldName
    Returns
    Type Description
    Field[]

    GetFragmentSource(StringBuilder, int[], Field[], int, int)

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected virtual string GetFragmentSource(StringBuilder buffer, int[] index, Field[] values, int startOffset, int endOffset)
    Parameters
    Type Name Description
    StringBuilder buffer
    int[] index
    Field[] values
    int startOffset
    int endOffset
    Returns
    Type Description
    string

    GetFragmentSourceMSO(StringBuilder, int[], Field[], int, int, int[])

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected virtual string GetFragmentSourceMSO(StringBuilder buffer, int[] index, Field[] values, int startOffset, int endOffset, int[] modifiedStartOffset)
    Parameters
    Type Name Description
    StringBuilder buffer
    int[] index
    Field[] values
    int startOffset
    int endOffset
    int[] modifiedStartOffset
    Returns
    Type Description
    string

    GetPostTag(int)

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected virtual string GetPostTag(int num)
    Parameters
    Type Name Description
    int num
    Returns
    Type Description
    string

    GetPostTag(string[], int)

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected virtual string GetPostTag(string[] postTags, int num)
    Parameters
    Type Name Description
    string[] postTags
    int num
    Returns
    Type Description
    string

    GetPreTag(int)

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected virtual string GetPreTag(int num)
    Parameters
    Type Name Description
    int num
    Returns
    Type Description
    string

    GetPreTag(string[], int)

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected virtual string GetPreTag(string[] preTags, int num)
    Parameters
    Type Name Description
    string[] preTags
    int num
    Returns
    Type Description
    string

    GetWeightedFragInfoList(IList<WeightedFragInfo>)

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    public abstract IList<FieldFragList.WeightedFragInfo> GetWeightedFragInfoList(IList<FieldFragList.WeightedFragInfo> src)
    Parameters
    Type Name Description
    IList<FieldFragList.WeightedFragInfo> src
    Returns
    Type Description
    IList<FieldFragList.WeightedFragInfo>

    MakeFragment(StringBuilder, int[], Field[], WeightedFragInfo, string[], string[], IEncoder)

    Base IFragmentsBuilder implementation that supports colored pre/post tags and multivalued fields.

    Uses IBoundaryScanner to determine fragments.
    Declaration
    protected virtual string MakeFragment(StringBuilder buffer, int[] index, Field[] values, FieldFragList.WeightedFragInfo fragInfo, string[] preTags, string[] postTags, IEncoder encoder)
    Parameters
    Type Name Description
    StringBuilder buffer
    int[] index
    Field[] values
    FieldFragList.WeightedFragInfo fragInfo
    string[] preTags
    string[] postTags
    IEncoder encoder
    Returns
    Type Description
    string

    Implements

    IFragmentsBuilder
    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.