jpountz commented on code in PR #13542: URL: https://github.com/apache/lucene/pull/13542#discussion_r1686649591
########## lucene/core/src/test/org/apache/lucene/search/TestSynonymQuery.java: ########## @@ -198,7 +198,17 @@ private void doTestScores(int totalHitsThreshold) throws IOException { if (topDocs.totalHits.value < totalHitsThreshold) { assertEquals(new TotalHits(11, TotalHits.Relation.EQUAL_TO), topDocs.totalHits); } else { - assertEquals(TotalHits.Relation.GREATER_THAN_OR_EQUAL_TO, topDocs.totalHits.relation); + /* + TODO: this is probably not the correct long term fix, yet it targets an edge case that I am not even sure we + should worry about. The problem already exists without intra-segment concurrency. + When a slice targets a single document, it does not early terminate, as the totalHitsThreshold check is + performed after collecting each doc. We will then get accurate results. + */ + if (hasSingleDocSlice(searcher)) { Review Comment: Is it good enough if you pass 1 instead of 2 in `testScores()`? -- 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