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`

### Field Summary

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

`leafContexts, readerContext`

### Constructor Summary

Constructors
Constructor and Description
`QueryProfilerIndexSearcher(IndexReader reader)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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, getQueryCache, getQueryCachingPolicy, getSimilarity, getSlices, getTopReaderContext, search, search, search, search, search, search, searchAfter, searchAfter, searchAfter, setDefaultQueryCache, setDefaultQueryCachingPolicy, setQueryCache, setQueryCachingPolicy, setSimilarity, slices, termStatistics, termStatistics, 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