Github user jimczi commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/495#discussion_r232199647
  
    --- Diff: 
lucene/core/src/java/org/apache/lucene/search/ConstantScoreScorer.java ---
    @@ -58,6 +58,14 @@ public float getMaxScore(int upTo) throws IOException {
         return score;
       }
     
    +  @Override
    +  public void setMinCompetitiveScore(float minScore) throws IOException {
    +    float minScoreDown = Math.nextDown(minScore);
    --- End diff --
    
    > I understand that we need to save the current doc to not lose it. But 
even when I don't save it, the indirection you suggest make the test pass and I 
don't understand why. 
    
    That's not related to this test. When `minCompetitiveScore` is called the 
doc id iterator should stay on the current doc and only return NO_MORE_DOCS 
when it is advanced (nextDoc or advance). You can add a test to check this by 
calling `minCompetitiveScore` in the test and then check that the iterator 
still return the current doc until it is advanced.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to