org.apache.lucene.search
Class CheckHits.ExplanationAsserter

java.lang.Object
  extended by org.apache.lucene.search.Collector
      extended by org.apache.lucene.search.CheckHits.ExplanationAsserter
Enclosing class:
CheckHits

public static class CheckHits.ExplanationAsserter
extends org.apache.lucene.search.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)

Field Summary
static float SCORE_TOLERANCE_DELTA
          Deprecated.  
 
Constructor Summary
CheckHits.ExplanationAsserter(org.apache.lucene.search.Query q, String defaultFieldName, org.apache.lucene.search.Searcher s)
          Constructs an instance which does shallow tests on the Explanation
CheckHits.ExplanationAsserter(org.apache.lucene.search.Query q, String defaultFieldName, org.apache.lucene.search.Searcher s, boolean deep)
           
 
Method Summary
 boolean acceptsDocsOutOfOrder()
           
 void collect(int doc)
           
 void setNextReader(org.apache.lucene.index.IndexReader reader, int docBase)
           
 void setScorer(org.apache.lucene.search.Scorer scorer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCORE_TOLERANCE_DELTA

@Deprecated
public static float SCORE_TOLERANCE_DELTA
Deprecated. 
See Also:
CheckHits.EXPLAIN_SCORE_TOLERANCE_DELTA
Constructor Detail

CheckHits.ExplanationAsserter

public CheckHits.ExplanationAsserter(org.apache.lucene.search.Query q,
                                     String defaultFieldName,
                                     org.apache.lucene.search.Searcher s)
Constructs an instance which does shallow tests on the Explanation


CheckHits.ExplanationAsserter

public CheckHits.ExplanationAsserter(org.apache.lucene.search.Query q,
                                     String defaultFieldName,
                                     org.apache.lucene.search.Searcher s,
                                     boolean deep)
Method Detail

setScorer

public void setScorer(org.apache.lucene.search.Scorer scorer)
               throws IOException
Specified by:
setScorer in class org.apache.lucene.search.Collector
Throws:
IOException

collect

public void collect(int doc)
             throws IOException
Specified by:
collect in class org.apache.lucene.search.Collector
Throws:
IOException

setNextReader

public void setNextReader(org.apache.lucene.index.IndexReader reader,
                          int docBase)
Specified by:
setNextReader in class org.apache.lucene.search.Collector

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Specified by:
acceptsDocsOutOfOrder in class org.apache.lucene.search.Collector


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