Package org.apache.lucene.monitor
Class MultiMatchingQueries<T extends QueryMatch>
- java.lang.Object
-
- org.apache.lucene.monitor.MultiMatchingQueries<T>
-
- Type Parameters:
T- the type of QueryMatch returned
public class MultiMatchingQueries<T extends QueryMatch> extends java.lang.ObjectClass to hold the results of matching a batch ofDocuments against queries held in the Monitor
-
-
Field Summary
Fields Modifier and Type Field Description private intbatchSizeprivate java.util.Map<java.lang.String,java.lang.Exception>errorsprivate java.util.List<java.util.Map<java.lang.String,T>>matchesprivate intqueriesRunprivate longqueryBuildTimeprivate longsearchTime
-
Constructor Summary
Constructors Constructor Description MultiMatchingQueries(java.util.List<java.util.Map<java.lang.String,T>> matches, java.util.Map<java.lang.String,java.lang.Exception> errors, long queryBuildTime, long searchTime, int queriesRun, int batchSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBatchSize()java.util.Map<java.lang.String,java.lang.Exception>getErrors()intgetMatchCount(int docId)java.util.Collection<T>getMatches(int docId)intgetQueriesRun()longgetQueryBuildTime()longgetSearchTime()Tmatches(java.lang.String queryId, int docId)Returns the QueryMatch for the given query and document, or null if it did not match(package private) MatchingQueries<T>singleton()
-
-
-
Field Detail
-
matches
private final java.util.List<java.util.Map<java.lang.String,T extends QueryMatch>> matches
-
errors
private final java.util.Map<java.lang.String,java.lang.Exception> errors
-
queryBuildTime
private final long queryBuildTime
-
searchTime
private final long searchTime
-
queriesRun
private final int queriesRun
-
batchSize
private final int batchSize
-
-
Constructor Detail
-
MultiMatchingQueries
MultiMatchingQueries(java.util.List<java.util.Map<java.lang.String,T>> matches, java.util.Map<java.lang.String,java.lang.Exception> errors, long queryBuildTime, long searchTime, int queriesRun, int batchSize)
-
-
Method Detail
-
matches
public T matches(java.lang.String queryId, int docId)
Returns the QueryMatch for the given query and document, or null if it did not match- Parameters:
queryId- the query iddocId- the doc id- Returns:
- the QueryMatch for the given query and document, or null if it did not match
-
getMatches
public java.util.Collection<T> getMatches(int docId)
- Parameters:
docId- document id to check- Returns:
- all matches for a particular document
-
getMatchCount
public int getMatchCount(int docId)
- Parameters:
docId- document id to check- Returns:
- the number of queries that matched for a given document
-
getQueryBuildTime
public long getQueryBuildTime()
- Returns:
- how long (in ms) it took to build the Presearcher query for the matcher run
-
getSearchTime
public long getSearchTime()
- Returns:
- how long (in ms) it took to run the selected queries
-
getQueriesRun
public int getQueriesRun()
- Returns:
- the number of queries passed to this CandidateMatcher during the matcher run
-
getBatchSize
public int getBatchSize()
- Returns:
- the number of documents in the batch
-
getErrors
public java.util.Map<java.lang.String,java.lang.Exception> getErrors()
- Returns:
- a List of any MatchErrors created during the matcher run
-
singleton
MatchingQueries<T> singleton()
-
-