You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2024/03/06 10:51:05 UTC

(lucene) branch main updated: Check whether document exists without relying on the id (#13160)

This is an automated email from the ASF dual-hosted git repository.

mikemccand pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new 49db29e59f1 Check whether document exists without relying on the id (#13160)
49db29e59f1 is described below

commit 49db29e59f1d9c7de33bc09d42334a6afab943ac
Author: Tim Grein <ti...@4greins.de>
AuthorDate: Wed Mar 6 11:50:59 2024 +0100

    Check whether document exists without relying on the id (#13160)
---
 .../org/apache/lucene/luke/models/documents/TestDocumentsImpl.java     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lucene/luke/src/test/org/apache/lucene/luke/models/documents/TestDocumentsImpl.java b/lucene/luke/src/test/org/apache/lucene/luke/models/documents/TestDocumentsImpl.java
index 47dc6898c87..b230778331e 100644
--- a/lucene/luke/src/test/org/apache/lucene/luke/models/documents/TestDocumentsImpl.java
+++ b/lucene/luke/src/test/org/apache/lucene/luke/models/documents/TestDocumentsImpl.java
@@ -186,8 +186,7 @@ public class TestDocumentsImpl extends DocumentsTestBase {
     documents.firstTerm("title").orElseThrow(IllegalStateException::new);
     Term term = documents.seekTerm("adv").orElseThrow(IllegalStateException::new);
     assertEquals("adventures", term.text());
-    int docid = documents.firstTermDoc().orElseThrow(IllegalStateException::new);
-    assertEquals(1, docid);
+    assertTrue(documents.firstTermDoc().isPresent());
   }
 
   @Test