## org.apache.lucene.search
Class CheckHits.ExplanationAssertingSearcher

    java.lang.Object
      org.apache.lucene.search.Searcher
          org.apache.lucene.search.IndexSearcher
              org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher

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

Enclosing class:
  CheckHits

    public static class CheckHits.ExplanationAssertingSearcher

extends org.apache.lucene.search.IndexSearcher

an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.

See Also:
  `CheckHits.ExplanationAsserter`

Field Summary

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

Constructor Summary
`CheckHits.ExplanationAssertingSearcher(org.apache.lucene.index.IndexReader r)`

Method Summary
`protected void` `checkExplanations(org.apache.lucene.search.Query q)`
`void` `search(org.apache.lucene.search.Query query, org.apache.lucene.search.Collector results)`
`void` `search(org.apache.lucene.search.Query query, org.apache.lucene.search.Filter filter, org.apache.lucene.search.Collector results)`
`org.apache.lucene.search.TopDocs` `search(org.apache.lucene.search.Query query, org.apache.lucene.search.Filter filter, int n)`
`org.apache.lucene.search.TopFieldDocs` `search(org.apache.lucene.search.Query query, org.apache.lucene.search.Filter filter, int n, org.apache.lucene.search.Sort sort)`

Methods inherited from class org.apache.lucene.search.IndexSearcher
`close, createNormalizedWeight, doc, doc, docFreq, explain, explain, gatherSubReaders, getIndexReader, getSimilarity, getSubReaders, maxDoc, rewrite, 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

### CheckHits.ExplanationAssertingSearcher

    public CheckHits.ExplanationAssertingSearcher(org.apache.lucene.index.IndexReader r)
                                           throws IOException

Throws:
  `IOException`

Method Detail

### checkExplanations

    protected void checkExplanations(org.apache.lucene.search.Query q)
                              throws IOException

  Throws:
    `IOException`

### search

    public org.apache.lucene.search.TopFieldDocs search(org.apache.lucene.search.Query query,
                                                        org.apache.lucene.search.Filter filter,
                                                        int n,
                                                        org.apache.lucene.search.Sort sort)
                                                 throws IOException

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

### search

    public void search(org.apache.lucene.search.Query query,
                       org.apache.lucene.search.Collector results)
                throws IOException

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

### search

    public void search(org.apache.lucene.search.Query query,
                       org.apache.lucene.search.Filter filter,
                       org.apache.lucene.search.Collector results)
                throws IOException

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

### search

    public org.apache.lucene.search.TopDocs search(org.apache.lucene.search.Query query,
                                                   org.apache.lucene.search.Filter filter,
                                                   int n)
                                            throws IOException

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