Mikep86 commented on code in PR #13587: URL: https://github.com/apache/lucene/pull/13587#discussion_r1684299328
########## lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java: ########## @@ -101,12 +99,7 @@ public Weight createWeight( .rewrite(new ConstantScoreQuery(childQuery)) .createWeight(searcher, weightScoreMode, 0f); } else { - // if the score is needed we force the collection mode to COMPLETE because the child query - // cannot skip - // non-competitive documents. - childWeight = - childQuery.createWeight( - searcher, weightScoreMode.needsScores() ? COMPLETE : weightScoreMode, boost); + childWeight = childQuery.createWeight(searcher, weightScoreMode, boost); Review Comment: My logic with this change was that it's simpler to pass `weightScoreMode` directly because the child query can now skip non-competitive documents. I thought about forcing the collection mode to `COMPLETE` when `weightScoreMode.isExhaustive == true`, but that only happens when `weightScoreMode` is either `COMPLETE` or `COMPLETE_NO_SCORES`. Are there larger side-effects to always passing through `weightScoreMode` directly? We could force the collection mode to `COMPLETE` except when `weightScoreMode.isExhaustive == false` and `scoreMode == ScoreMode.Max`, but I didn't do that initially because I thought that could miss edge cases. WDYT? -- 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