mayya-sharipova commented on issue #1351: LUCENE-9280: Collectors to skip noncompetitive documents URL: https://github.com/apache/lucene-solr/pull/1351#issuecomment-610078508 @romseygeek Thanks for the feedback. I have addressed your comments 1 and 2 in 89d241e. Indeed, the APIs look simpler, I like them more now. I just renamed `wrapDocIdSetIterator` to `filterIterator`. The comment 3 is challenging to address. I have already tried to do this in d732d7eb9 as a response to @jimczi feedback, but I reverted this commit because of those challenges. `TopFieldCollector` has a lot of subtle logic that makes it difficult to reason and imitate in other classes. The challenges are following: 1. `HitsThresholdChecker`. First we are passing a not strictly related class `hitsThresholdChecker` to `LeafComparator`. Secondly, it turned out that we can't use `hitsThresholdChecker.isThresholdReached` method in `setBottom` as it starts to return `true` only after we have already collected hits more than `numHits`, but in `setBottom` we need to update an iterator as as soon as we have collected `numHits`, because if there are no competitive docs later `setBottom` will never be called again. 2. `TotalHitsRelation`. If we end up updating the iterator, we need to set it to `TotalHits.Relation.GREATER_THAN_OR_EQUAL_TO` and it is not clear to me when this should be set. 3. If we have a parallel collector and would like to update a global bottom, it is not clear to me how to do this with this model as well. I guess I need to think more about it.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org