/// <summary> /// check that the # of hits is the same as from a very /// simple regexpquery implementation. /// </summary> protected internal virtual void AssertSame(string regexp) { RegexpQuery smart = new RegexpQuery(new Term(FieldName, regexp), RegExp.NONE); DumbRegexpQuery dumb = new DumbRegexpQuery(this, new Term(FieldName, regexp), RegExp.NONE); TopDocs smartDocs = Searcher1.Search(smart, 25); TopDocs dumbDocs = Searcher2.Search(dumb, 25); CheckHits.CheckEqual(smart, smartDocs.ScoreDocs, dumbDocs.ScoreDocs); }
/// <summary> /// check that the # of hits is the same as from a very /// simple regexpquery implementation. /// </summary> protected internal virtual void AssertSame(string regexp) { RegexpQuery smart = new RegexpQuery(new Term(FieldName, regexp), RegExp.NONE); DumbRegexpQuery dumb = new DumbRegexpQuery(new Term(FieldName, regexp), RegExp.NONE); TopDocs smartDocs = Searcher1.Search(smart, 25); TopDocs dumbDocs = Searcher2.Search(dumb, 25); CheckHits.CheckEqual(smart, smartDocs.ScoreDocs, dumbDocs.ScoreDocs); }