You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/05/30 13:53:14 UTC

[GitHub] [lucene] mocobeta commented on a diff in pull request #931: LUCENE-10597: move globalMaxScore to MaxScoreCache

mocobeta commented on code in PR #931:
URL: https://github.com/apache/lucene/pull/931#discussion_r884855095


##########
lucene/core/src/java/org/apache/lucene/search/MaxScoreCache.java:
##########
@@ -80,6 +82,9 @@ int getLevel(int upTo) throws IOException {
 
   /** Return the maximum score for the given {@code level}. */
   float getMaxScoreForLevel(int level) throws IOException {
+    if (level < 0) {

Review Comment:
   The original expression was `level == -1`. "smaller than zero" might be better here since there is an assumption that `level` is greater or equal to zero, I have no strong opinion on it though. 



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org