Package org.apache.lucene.sandbox.search

# Class QueryProfilerIndexSearcher

java.lang.Object
org.apache.lucene.search.IndexSearcher
org.apache.lucene.sandbox.search.QueryProfilerIndexSearcher

public class QueryProfilerIndexSearcher extends IndexSearcher
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.LeafReaderContextPartition, IndexSearcher.LeafSlice, IndexSearcher.TooManyClauses, IndexSearcher.TooManyNestedClauses`

- ## Field Summary

  ### Fields inherited from class org.apache.lucene.search.IndexSearcher

  `leafContexts, readerContext`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `QueryProfilerIndexSearcher(IndexReader reader)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Weight`
  `createWeight(Query query, ScoreMode scoreMode, float boost)`
  `List<QueryProfilerResult>`
  `getProfileResult()`
  `long`
  `getRewriteTime()`
  `Query`
  `rewrite(Query original)`

  ### Methods inherited from class org.apache.lucene.search.IndexSearcher

  `collectionStatistics, count, explain, explain, getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, getIndexReader, getLeafContexts, getMaxClauseCount, getQueryCache, getQueryCachingPolicy, getSimilarity, getSlices, getTaskExecutor, getTimeout, getTopReaderContext, search, search, search, search, search, search, searchAfter, searchAfter, searchAfter, searchLeaf, setDefaultQueryCache, setDefaultQueryCachingPolicy, setMaxClauseCount, setQueryCache, setQueryCachingPolicy, setSimilarity, setTimeout, slices, slices, storedFields, termStatistics, timedOut, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### QueryProfilerIndexSearcher

    public QueryProfilerIndexSearcher(IndexReader reader)

- ## Method Details

  - ### rewrite

    public Query rewrite(Query original) throws IOException
    Overrides:
      `rewrite` in class `IndexSearcher`
    Throws:
      `IOException`

  - ### createWeight

    public Weight createWeight(Query query, ScoreMode scoreMode, float boost) throws IOException
    Overrides:
      `createWeight` in class `IndexSearcher`
    Throws:
      `IOException`

  - ### getRewriteTime

    public long getRewriteTime()
    Returns:
      total time taken to rewrite all queries in this profile

  - ### getProfileResult

    public List<QueryProfilerResult> getProfileResult()
    Returns:
      a hierarchical representation of the profiled tree