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 2021/09/29 20:51:44 UTC

[GitHub] [lucene] jpountz commented on a change in pull request #331: LUCENE-10126: Re-introduce chunk scoring logic in tests

jpountz commented on a change in pull request #331:
URL: https://github.com/apache/lucene/pull/331#discussion_r718874053



##########
File path: lucene/core/src/java/org/apache/lucene/search/FilterLeafCollector.java
##########
@@ -42,6 +42,11 @@ public void collect(int doc) throws IOException {
     in.collect(doc);
   }
 
+  @Override
+  public DocIdSetIterator competitiveIterator() throws IOException {
+    return in.competitiveIterator();
+  }

Review comment:
       Our general guideline is that FilterXXX classes should only delegate abstract methods. Can we move this to FilterLeafCollector classes where it makes sense?

##########
File path: lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorable.java
##########
@@ -52,6 +52,7 @@ public static Scorable unwrap(Scorable in) {
     while (true) {
       if (in instanceof AssertingScorable) in = ((AssertingScorable) in).in;
       else if (in instanceof AssertingScorer) in = ((AssertingScorer) in).in;
+      else if (in instanceof FilterScorer) in = ((FilterScorer) in).in;

Review comment:
       this doesn't look correct to me as some FilterScorer impls might be altering scores?

##########
File path: lucene/core/src/java/org/apache/lucene/search/FilterScorer.java
##########
@@ -74,4 +74,9 @@ public final DocIdSetIterator iterator() {
   public final TwoPhaseIterator twoPhaseIterator() {
     return in.twoPhaseIterator();
   }
+
+  @Override
+  public void setMinCompetitiveScore(float minScore) throws IOException {
+    in.setMinCompetitiveScore(minScore);
+  }

Review comment:
       And likewise here can we move this to FilterScorer impls where it makes sense?




-- 
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