## org.apache.lucene.search
Class AssertingIndexSearcher

    java.lang.Object
      org.apache.lucene.search.Searcher
          org.apache.lucene.search.IndexSearcher
              org.apache.lucene.search.AssertingIndexSearcher

All Implemented Interfaces:
  Closeable, org.apache.lucene.search.Searchable

    public class AssertingIndexSearcher

extends org.apache.lucene.search.IndexSearcher

Helper class that adds some extra checks to ensure correct usage of `IndexSearcher` and `Weight`. TODO: Extend this by more checks, that's just a start.

Field Summary

Fields inherited from class org.apache.lucene.search.IndexSearcher
`docStarts, subReaders, subSearchers`

Constructor Summary
`AssertingIndexSearcher(org.apache.lucene.index.IndexReader r)`
`AssertingIndexSearcher(org.apache.lucene.index.IndexReader r, ExecutorService ex)`

Method Summary
`org.apache.lucene.search.Weight` `createNormalizedWeight(org.apache.lucene.search.Query query)` Ensures, that the returned `Weight` is not normalized again, which may produce wrong scores.

Methods inherited from class org.apache.lucene.search.IndexSearcher
`close, doc, doc, docFreq, explain, explain, gatherSubReaders, getIndexReader, getSimilarity, getSubReaders, maxDoc, rewrite, search, search, search, search, search, search, search, search, search, search, search, searchAfter, searchAfter, setDefaultFieldSortScoring, setSimilarity, toString`

Methods inherited from class org.apache.lucene.search.Searcher
`createWeight, docFreqs`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AssertingIndexSearcher

    public AssertingIndexSearcher(org.apache.lucene.index.IndexReader r)

### AssertingIndexSearcher

    public AssertingIndexSearcher(org.apache.lucene.index.IndexReader r,
                                  ExecutorService ex)

Method Detail

### createNormalizedWeight

    public org.apache.lucene.search.Weight createNormalizedWeight(org.apache.lucene.search.Query query)
                                                           throws IOException

  Ensures, that the returned `Weight` is not normalized again, which may produce wrong scores.

  Overrides:
    `createNormalizedWeight` in class `org.apache.lucene.search.IndexSearcher`
  Throws:
    `IOException`