jpountz commented on code in PR #13587: URL: https://github.com/apache/lucene/pull/13587#discussion_r1684308932
########## 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: > Are there larger side-effects to always passing through weightScoreMode directly? It's complicated, but the short answer is that if you pass TOP_SCORES, then you get a scorer that knows how to skip hits based on scores, but has more overhead at iterating documents than if you had passed COMPLETE. So the idea before your change was that since we don't take advantage of `setMinCompetitiveScore` anyway, then let's use the COMPLETE score mode to be more efficient. -- 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