Skip to content

Commit

Permalink
Adding MatchAllDocsQuery to asserts
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Mar 8, 2024
1 parent f45bb8a commit 0383721
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.ConstantScoreQuery;
import org.apache.lucene.search.IndexOrDocValuesQuery;
import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.MatchNoDocsQuery;
import org.apache.lucene.search.PointInSetQuery;
import org.apache.lucene.search.Query;
Expand Down Expand Up @@ -137,6 +138,7 @@ protected void doAssertLuceneQuery(TermsQueryBuilder queryBuilder, Query query,
.or(instanceOf(ConstantScoreQuery.class))
.or(instanceOf(MatchNoDocsQuery.class))
.or(instanceOf(IndexOrDocValuesQuery.class))
.or(instanceOf(MatchAllDocsQuery.class))
);
if (query instanceof ConstantScoreQuery) {
assertThat(((ConstantScoreQuery) query).getQuery(), instanceOf(BooleanQuery.class));
Expand Down

0 comments on commit 0383721

Please sign in to comment.