jpountz commented on code in PR #14830:
URL: https://github.com/apache/lucene/pull/14830#discussion_r2164950524


##########
lucene/core/src/test/org/apache/lucene/search/TestFieldExistsQuery.java:
##########
@@ -88,6 +88,25 @@ public void testDocValuesRewriteWithPointValuesPresent() 
throws IOException {
     dir.close();
   }
 
+  public void testDocValuesRewriteWithDocValuesSkipperPresent() throws 
IOException {
+    Directory dir = newDirectory();
+    RandomIndexWriter iw = new RandomIndexWriter(random(), dir);
+    final int numDocs = atLeast(100);
+    for (int i = 0; i < numDocs; ++i) {
+      Document doc = new Document();
+      doc.add(NumericDocValuesField.indexedField("dim", 2));
+      iw.addDocument(doc);
+    }
+    iw.commit();
+    final IndexReader reader = iw.getReader();
+    iw.close();
+
+    assertTrue(
+        (new FieldExistsQuery("dim")).rewrite(newSearcher(reader)) instanceof 
MatchAllDocsQuery);

Review Comment:
   nit, maybe do `assertEquals(new MatchAllDocsQuery(), new 
FieldExistsQuery("dim")).rewrite(newSearcher(reader)))` instead?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to