Show / Hide Table of Contents

    Interface IOffsetAttribute

    The start and end character offset of a Token.

    Inherited Members
    IAttribute.CopyTo(IAttribute)
    Namespace: Lucene.Net.Analysis.TokenAttributes
    Assembly: Lucene.Net.dll
    Syntax
    public interface IOffsetAttribute : IAttribute

    Properties

    | Improve this Doc View Source

    EndOffset

    Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text. The length of the token in the source text is (

    EndOffset
    - StartOffset).

    Declaration
    int EndOffset { get; }
    Property Value
    Type Description
    System.Int32
    See Also
    SetOffset(Int32, Int32)
    | Improve this Doc View Source

    StartOffset

    Returns this Token's starting offset, the position of the first character corresponding to this token in the source text.

    Note that the difference between EndOffset and StartOffset may not be equal to termText.Length, as the term text may have been altered by a stemmer or some other filter.

    Declaration
    int StartOffset { get; }
    Property Value
    Type Description
    System.Int32
    See Also
    SetOffset(Int32, Int32)

    Methods

    | Improve this Doc View Source

    SetOffset(Int32, Int32)

    Set the starting and ending offset.

    Declaration
    void SetOffset(int startOffset, int endOffset)
    Parameters
    Type Name Description
    System.Int32 startOffset
    System.Int32 endOffset
    See Also
    StartOffset
    EndOffset
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)