Module org.apache.lucene.monitor
Package org.apache.lucene.monitor
Class MatchingQueries<T extends QueryMatch>
- java.lang.Object
-
- org.apache.lucene.monitor.MatchingQueries<T>
-
- Type Parameters:
T
- the type of QueryMatch returned
public class MatchingQueries<T extends QueryMatch> extends java.lang.Object
Class to hold the results of matching a singleDocument
against queries held in the Monitor
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.Exception>
errors
private java.util.Map<java.lang.String,T>
matches
private int
queriesRun
private long
queryBuildTime
private long
searchTime
-
Constructor Summary
Constructors Constructor Description MatchingQueries(java.util.Map<java.lang.String,T> matches, java.util.Map<java.lang.String,java.lang.Exception> errors, long queryBuildTime, long searchTime, int queriesRun)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Exception>
getErrors()
int
getMatchCount()
java.util.Collection<T>
getMatches()
int
getQueriesRun()
long
getQueryBuildTime()
long
getSearchTime()
T
matches(java.lang.String queryId)
Returns the QueryMatch for the given query, or null if it did not match
-
-
-
Field Detail
-
matches
private final 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
-
-
Constructor Detail
-
MatchingQueries
MatchingQueries(java.util.Map<java.lang.String,T> matches, java.util.Map<java.lang.String,java.lang.Exception> errors, long queryBuildTime, long searchTime, int queriesRun)
-
-
Method Detail
-
matches
public T matches(java.lang.String queryId)
Returns the QueryMatch for the given query, or null if it did not match- Parameters:
queryId
- the query id
-
getMatches
public java.util.Collection<T> getMatches()
- Returns:
- all matches
-
getMatchCount
public int getMatchCount()
- Returns:
- the number of queries that matched
-
getQueryBuildTime
public long getQueryBuildTime()
- Returns:
- how long (in ns) 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
-
getErrors
public java.util.Map<java.lang.String,java.lang.Exception> getErrors()
- Returns:
- a List of any MatchErrors created during the matcher run
-
-