abstract class CollectingMatcher<T extends QueryMatch> extends CandidateMatcher<T>
Modifier and Type | Class and Description |
---|---|
private class |
CollectingMatcher.MatchCollector |
Modifier and Type | Field and Description |
---|---|
private ScoreMode |
scoreMode |
searcher
Constructor and Description |
---|
CollectingMatcher(IndexSearcher searcher,
ScoreMode scoreMode) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
doMatch(java.lang.String queryId,
int doc,
Scorable scorer)
Called when a query matches a Document
|
protected void |
matchQuery(java.lang.String queryId,
Query matchQuery,
java.util.Map<java.lang.String,java.lang.String> metadata)
Runs the supplied query against this CandidateMatcher's set of documents, storing any
resulting match, and recording the query in the presearcher hits
|
addMatch, copyMatches, doFinish, finish, reportError, resolve
private final ScoreMode scoreMode
CollectingMatcher(IndexSearcher searcher, ScoreMode scoreMode)
protected void matchQuery(java.lang.String queryId, Query matchQuery, java.util.Map<java.lang.String,java.lang.String> metadata) throws java.io.IOException
CandidateMatcher
matchQuery
in class CandidateMatcher<T extends QueryMatch>
queryId
- the query idmatchQuery
- the query to runmetadata
- the query metadatajava.io.IOException
- on IO errorsprotected abstract T doMatch(java.lang.String queryId, int doc, Scorable scorer) throws java.io.IOException
queryId
- the query IDdoc
- the index of the document in the DocumentBatchscorer
- the Scorer for this queryjava.io.IOException
- on IO error