Check whether document exists without relying on the id (#13160)

This commit is contained in:
Tim Grein 2024-03-06 11:50:59 +01:00 committed by GitHub
parent 012b959b05
commit 49db29e59f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -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