org.apache.lucene.search

## Class CheckHits.ExplanationAssertingSearcher

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

- Enclosing class:
    CheckHits

      public static class CheckHits.ExplanationAssertingSearcher
      extends IndexSearcher

  an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.
  See Also:
    `CheckHits.ExplanationAsserter`

- - ### 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
    `ExplanationAssertingSearcher(IndexReader r)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `checkExplanations(Query q)`
    `void` | `search(Query query, Collector results)`
    `TopDocs` | `search(Query query, int n)`
    `TopFieldDocs` | `search(Query query, int n, Sort sort)`

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

      `collectionStatistics, count, createWeight, doc, doc, doc, explain, explain, getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, getExecutor, getIndexReader, getQueryCache, getQueryCachingPolicy, getSimilarity, getSlices, getTopReaderContext, rewrite, search, search, search, searchAfter, searchAfter, searchAfter, setDefaultQueryCache, setDefaultQueryCachingPolicy, setQueryCache, setQueryCachingPolicy, setSimilarity, slices, termStatistics, toString`

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

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

- - ### Constructor Detail

    - #### ExplanationAssertingSearcher

          public ExplanationAssertingSearcher(IndexReader r)

  - ### Method Detail

    - #### checkExplanations

          protected void checkExplanations(Query q)
                                    throws IOException

      Throws:
        `IOException`

    - #### search

          public TopFieldDocs search(Query query,
                                     int n,
                                     Sort sort)
                              throws IOException

      Overrides:
        `search` in class `IndexSearcher`
      Throws:
        `IOException`

    - #### search

          public void search(Query query,
                             Collector results)
                      throws IOException

      Overrides:
        `search` in class `IndexSearcher`
      Throws:
        `IOException`

    - #### search

          public TopDocs search(Query query,
                                int n)
                         throws IOException

      Overrides:
        `search` in class `IndexSearcher`
      Throws:
        `IOException`

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.