ExactPhraseMatcher (Lucene 10.5.0 core API)
Description: declaration: package: org.apache.lucene.search, class: ExactPhraseMatcher

Package org.apache.lucene.search

# Class ExactPhraseMatcher

java.lang.Object
org.apache.lucene.search.PhraseMatcher
org.apache.lucene.search.ExactPhraseMatcher

public final class ExactPhraseMatcher extends PhraseMatcher
Expert: Find exact phrases

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExactPhraseMatcher(PhraseQuery.PostingsAndFreq[] postings, ScoreMode scoreMode, Similarity.SimScorer scorer, float matchCost)`
  Expert: Creates ExactPhraseMatcher instance

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `endOffset()`
  `int`
  `endPosition()`
  `boolean`
  `nextMatch()`
  Find the next match on the current document, returning `false` if there are none.
  `void`
  `resetPositions()`
  Called after `PhraseMatcher.approximation()` has been advanced to load positions for matching.
  `int`
  `startOffset()`
  `int`
  `startPosition()`

  ### Methods inherited from class org.apache.lucene.search.PhraseMatcher

  `getMatchCost`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ExactPhraseMatcher

    public ExactPhraseMatcher(PhraseQuery.PostingsAndFreq[] postings, ScoreMode scoreMode, Similarity.SimScorer scorer, float matchCost)
    Expert: Creates ExactPhraseMatcher instance

- ## Method Details

  - ### resetPositions

    public void resetPositions() throws IOException
    Description copied from class: `PhraseMatcher`
    Called after `PhraseMatcher.approximation()` has been advanced to load positions for matching.
    Specified by:
      `resetPositions` in class `PhraseMatcher`
    Throws:
      `IOException`

  - ### nextMatch

    public boolean nextMatch() throws IOException
    Description copied from class: `PhraseMatcher`
    Find the next match on the current document, returning `false` if there are none.
    Specified by:
      `nextMatch` in class `PhraseMatcher`
    Throws:
      `IOException`

  - ### startPosition

    public int startPosition()

  - ### endPosition

    public int endPosition()

  - ### startOffset

    public int startOffset() throws IOException
    Throws:
      `IOException`

  - ### endOffset

    public int endOffset() throws IOException
    Throws:
      `IOException`