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.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

    All Methods Instance Methods Concrete Methods
    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, doc, doc, doc, explain, explain, getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, getExecutor, getIndexReader, getLeafContexts, getMaxClauseCount, getQueryCache, getQueryCachingPolicy, getSimilarity, getSlices, getTaskExecutor, getTopReaderContext, search, search, search, search, search, search, searchAfter, searchAfter, searchAfter, 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 Detail

    - #### QueryProfilerIndexSearcher

          public QueryProfilerIndexSearcher​(IndexReader reader)

  - ### Method Detail

    - #### 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