public abstract class CandidateMatcher<T extends QueryMatch> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected IndexSearcher |
searcher
The searcher to run candidate queries against
|
| Constructor and Description |
|---|
CandidateMatcher(IndexSearcher searcher)
Creates a new CandidateMatcher for the supplied DocumentBatch
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMatch(T match,
int doc)
Record a match
|
protected void |
copyMatches(CandidateMatcher<T> other)
Copy all matches from another CandidateMatcher
|
protected void |
doFinish()
Called when all monitoring of a batch of documents is complete
|
protected abstract void |
matchQuery(String queryId,
Query matchQuery,
Map<String,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
|
abstract T |
resolve(T match1,
T match2)
If two matches from the same query are found (for example, two branches of a disjunction),
combine them.
|
protected final IndexSearcher searcher
public CandidateMatcher(IndexSearcher searcher)
searcher - the IndexSearcher to run queries againstprotected abstract void matchQuery(String queryId, Query matchQuery, Map<String,String> metadata) throws IOException
queryId - the query idmatchQuery - the query to runmetadata - the query metadataIOException - on IO errorsprotected final void addMatch(T match, int doc)
match - a QueryMatch objectpublic abstract T resolve(T match1, T match2)
match1 - the first match foundmatch2 - the second match foundprotected void doFinish()
protected void copyMatches(CandidateMatcher<T> other)
Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.