Skip to content

Commit

Permalink
Check whether document exists without relying on the id (#13160)
Browse files Browse the repository at this point in the history
  • Loading branch information
timgrein authored Mar 6, 2024
1 parent 012b959 commit 49db29e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ public void testFirstTermDoc() {
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
Expand Down

0 comments on commit 49db29e

Please sign in to comment.