CheckHitCollector() public static method

Tests that a query matches the an expected set of documents using a HitCollector.

Note that when using the HitCollector API, documents will be collected if they "match" regardless of what their score is.

public static CheckHitCollector ( Random random, Query query, string defaultFieldName, IndexSearcher searcher, int results, Similarity similarity ) : void
random System.Random
query Query the query to test
defaultFieldName string used for displaying the query in assertion messages
searcher IndexSearcher the searcher to test the query against
results int a list of documentIds that must match the query
similarity Similarity /// LUCENENET specific /// Removes dependency on ///
return void
Beispiel #1
0
        /// <summary>
        /// check the expDocNrs first, then check the query (and the explanations) </summary>
        public virtual void Qtest(Query q, int[] expDocNrs)
        {
            CheckHits.CheckHitCollector(
#if FEATURE_INSTANCE_TESTDATA_INITIALIZATION
                this,
#endif
                Random, q, FIELD, Searcher, expDocNrs);
        }
Beispiel #2
0
 /// <summary>check the expDocNrs first, then check the query (and the explanations) </summary>
 public virtual void  Qtest(Query q, int[] expDocNrs)
 {
     CheckHits.CheckHitCollector(q, FIELD, searcher, expDocNrs);
 }
 /// <summary>
 /// check the expDocNrs first, then check the query (and the explanations) </summary>
 public virtual void Qtest(Query q, int[] expDocNrs)
 {
     CheckHits.CheckHitCollector(Random(), q, FIELD, Searcher, expDocNrs, Similarity);
 }