Class PhrasePositions

java.lang.Object
org.apache.lucene.search.PhrasePositions

final class PhrasePositions extends Object
Position of a term in a document that takes into account the term offset within the phrase.
  • Field Details

    • position

      int position
    • count

      int count
    • offset

      int offset
    • ord

      final int ord
    • postings

      final PostingsEnum postings
    • next

    • rptGroup

      int rptGroup
    • rptInd

      int rptInd
    • terms

      final Term[] terms
  • Constructor Details

    • PhrasePositions

      PhrasePositions(PostingsEnum postings, int o, int ord, Term[] terms)
  • Method Details

    • firstPosition

      final void firstPosition() throws IOException
      Throws:
      IOException
    • nextPosition

      final boolean nextPosition() throws IOException
      Go to next location of this term current document, and set position as location - offset, so that a matching exact phrase is easily identified when all PhrasePositions have exactly the same position.
      Throws:
      IOException
    • toString

      public String toString()
      for debug purposes
      Overrides:
      toString in class Object