Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class Passage

    Represents a passage (typically a sentence of the document).

    A passage contains NumMatches highlights from the query, and the offsets and query terms that correspond with each match.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    System.Object
    Passage
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Search.PostingsHighlight
    Assembly: Lucene.Net.ICU.dll
    Syntax
    public sealed class Passage

    Properties

    | Improve this Doc View Source

    EndOffset

    Gets the end index (exclusive) of the passage in the original content: always >= StartOffset

    Declaration
    public int EndOffset { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    MatchEnds

    End offsets of the term matches, corresponding with MatchStarts.

    Only NumMatches are valid. Note that its possible that an end offset could exceed beyond the bounds of the passage EndOffset, if the Lucene.Net.Analysis.Analyzer produced a term which spans a passage boundary.

    Declaration
    public IReadOnlyList<int> MatchEnds { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<System.Int32>
    | Improve this Doc View Source

    MatchStarts

    Start offsets of the term matches, in increasing order.

    Only NumMatches are valid. Note that these offsets are absolute (not relative to StartOffset).

    Declaration
    public IReadOnlyList<int> MatchStarts { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<System.Int32>
    | Improve this Doc View Source

    MatchTerms

    BytesRef (term text) of the matches, corresponding with MatchStarts.

    Only NumMatches are valid.

    Declaration
    public IReadOnlyList<BytesRef> MatchTerms { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<Lucene.Net.Util.BytesRef>
    | Improve this Doc View Source

    NumMatches

    Number of term matches available in MatchStarts, MatchEnds, MatchTerms

    Declaration
    public int NumMatches { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Score

    Passage's score.

    Declaration
    public float Score { get; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    StartOffset

    Gets the start index (inclusive) of the passage in the original content: always >= 0.

    Declaration
    public int StartOffset { get; }
    Property Value
    Type Description
    System.Int32
    • Improve this Doc
    • View Source
    Back to top Copyright © 2022 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.