/// <summary> /// check that the # of hits is the same as from a very /// simple prefixquery implementation. /// </summary> private void AssertSame(string prefix) { PrefixQuery smart = new PrefixQuery(new Term("field", prefix)); DumbPrefixQuery dumb = new DumbPrefixQuery(this, new Term("field", prefix)); TopDocs smartDocs = Searcher.Search(smart, 25); TopDocs dumbDocs = Searcher.Search(dumb, 25); CheckHits.CheckEqual(smart, smartDocs.ScoreDocs, dumbDocs.ScoreDocs); }