Interface MatchesIterator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int endOffset()
      The ending offset of the current match, or -1 if offsets are not available Should only be called after next() has returned true
      int endPosition()
      The end position of the current match Should only be called after next() has returned true
      Query getQuery()
      Returns the Query causing the current match If this MatchesIterator has been returned from a getSubMatches() call, then returns a TermQuery equivalent to the current match Should only be called after next() has returned true
      MatchesIterator getSubMatches()
      Returns a MatchesIterator that iterates over the positions and offsets of individual terms within the current match Returns null if there are no submatches (ie the current iterator is at the leaf level) Should only be called after next() has returned true
      boolean next()
      Advance the iterator to the next match position
      int startOffset()
      The starting offset of the current match, or -1 if offsets are not available Should only be called after next() has returned true
      int startPosition()
      The start position of the current match Should only be called after next() has returned true
    • Method Detail

      • next

        boolean next()
              throws java.io.IOException
        Advance the iterator to the next match position
        Returns:
        true if matches have not been exhausted
        Throws:
        java.io.IOException
      • startPosition

        int startPosition()
        The start position of the current match Should only be called after next() has returned true
      • endPosition

        int endPosition()
        The end position of the current match Should only be called after next() has returned true
      • startOffset

        int startOffset()
                 throws java.io.IOException
        The starting offset of the current match, or -1 if offsets are not available Should only be called after next() has returned true
        Throws:
        java.io.IOException
      • endOffset

        int endOffset()
               throws java.io.IOException
        The ending offset of the current match, or -1 if offsets are not available Should only be called after next() has returned true
        Throws:
        java.io.IOException
      • getSubMatches

        MatchesIterator getSubMatches()
                               throws java.io.IOException
        Returns a MatchesIterator that iterates over the positions and offsets of individual terms within the current match Returns null if there are no submatches (ie the current iterator is at the leaf level) Should only be called after next() has returned true
        Throws:
        java.io.IOException
      • getQuery

        Query getQuery()
        Returns the Query causing the current match If this MatchesIterator has been returned from a getSubMatches() call, then returns a TermQuery equivalent to the current match Should only be called after next() has returned true