org.apache.lucene.search

## Class CheckHits.ExplanationAsserter

- java.lang.Object
- - org.apache.lucene.search.Collector
  - - org.apache.lucene.search.CheckHits.ExplanationAsserter

- Enclosing class:
    CheckHits

      public static class CheckHits.ExplanationAsserter
      extends Collector

  Asserts that the score explanation for every document matching a query corresponds with the true score. NOTE: this HitCollector should only be used with the Query and Searcher specified at when it is constructed.
  See Also:
    `CheckHits.verifyExplanation(java.lang.String, int, float, boolean, org.apache.lucene.search.Explanation)`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CheckHits.ExplanationAsserter(Query q, String defaultFieldName, IndexSearcher s)` Constructs an instance which does shallow tests on the Explanation
    `CheckHits.ExplanationAsserter(Query q, String defaultFieldName, IndexSearcher s, boolean deep)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `acceptsDocsOutOfOrder()`
    `void` | `collect(int doc)`
    `void` | `setNextReader(AtomicReaderContext context)`
    `void` | `setScorer(Scorer scorer)`

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

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

- - ### Constructor Detail

    - #### CheckHits.ExplanationAsserter

          public CheckHits.ExplanationAsserter(Query q,
                                       String defaultFieldName,
                                       IndexSearcher s)

      Constructs an instance which does shallow tests on the Explanation

    - #### CheckHits.ExplanationAsserter

          public CheckHits.ExplanationAsserter(Query q,
                                       String defaultFieldName,
                                       IndexSearcher s,
                                       boolean deep)

  - ### Method Detail

    - #### setScorer

          public void setScorer(Scorer scorer)
                         throws IOException

      Specified by:
        `setScorer` in class `Collector`
      Throws:
        `IOException`

    - #### collect

          public void collect(int doc)
                       throws IOException

      Specified by:
        `collect` in class `Collector`
      Throws:
        `IOException`

    - #### setNextReader

          public void setNextReader(AtomicReaderContext context)

      Specified by:
        `setNextReader` in class `Collector`

    - #### acceptsDocsOutOfOrder

          public boolean acceptsDocsOutOfOrder()

      Specified by:
        `acceptsDocsOutOfOrder` in class `Collector`

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