Package org.apache.lucene.search
Class PhraseMatcher
- java.lang.Object
-
- org.apache.lucene.search.PhraseMatcher
-
- Direct Known Subclasses:
ExactPhraseMatcher,SloppyPhraseMatcher
public abstract class PhraseMatcher extends Object
Base class for exact and sloppy phrase matchingTo find matches on a document, first advance
approximation()to the relevant document, then callreset(). Clients can then callnextMatch()to iterate over the matches- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description floatgetMatchCost()An estimate of the average cost of finding all matches on a documentabstract booleannextMatch()Find the next match on the current document, returningfalseif there are none.abstract voidreset()Called afterapproximation()has been advanced
-
-
-
Method Detail
-
reset
public abstract void reset() throws IOExceptionCalled afterapproximation()has been advanced- Throws:
IOException
-
nextMatch
public abstract boolean nextMatch() throws IOExceptionFind the next match on the current document, returningfalseif there are none.- Throws:
IOException
-
getMatchCost
public float getMatchCost()
An estimate of the average cost of finding all matches on a document- See Also:
TwoPhaseIterator.matchCost()
-
-