Package org.apache.lucene.sandbox.search
Class QueryProfilerIndexSearcher
java.lang.Object
org.apache.lucene.search.IndexSearcher
org.apache.lucene.sandbox.search.QueryProfilerIndexSearcher
An extension of
IndexSearcher
that records profile information for all queries it
executes.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.IndexSearcher
IndexSearcher.LeafSlice, IndexSearcher.TooManyClauses, IndexSearcher.TooManyNestedClauses
-
Field Summary
FieldsFields inherited from class org.apache.lucene.search.IndexSearcher
leafContexts, readerContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateWeight
(Query query, ScoreMode scoreMode, float boost) Creates aWeight
for the given query, potentially adding caching if possible and configured.long
Expert: called to re-write queries into primitive queries.Methods inherited from class org.apache.lucene.search.IndexSearcher
collectionStatistics, count, doc, doc, doc, explain, explain, getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, getExecutor, getIndexReader, getLeafContexts, getMaxClauseCount, getQueryCache, getQueryCachingPolicy, getSimilarity, getSlices, getTopReaderContext, search, search, search, search, search, search, searchAfter, searchAfter, searchAfter, setDefaultQueryCache, setDefaultQueryCachingPolicy, setMaxClauseCount, setQueryCache, setQueryCachingPolicy, setSimilarity, setTimeout, slices, slices, termStatistics, timedOut, toString
-
Field Details
-
profiler
-
-
Constructor Details
-
QueryProfilerIndexSearcher
-
-
Method Details
-
rewrite
Description copied from class:IndexSearcher
Expert: called to re-write queries into primitive queries.- Overrides:
rewrite
in classIndexSearcher
- Throws:
IOException
-
createWeight
Description copied from class:IndexSearcher
Creates aWeight
for the given query, potentially adding caching if possible and configured.- Overrides:
createWeight
in classIndexSearcher
- Throws:
IOException
-
getRewriteTime
public long getRewriteTime()- Returns:
- total time taken to rewrite all queries in this profile
-
getProfileResult
- Returns:
- a hierarchical representation of the profiled tree
-