Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check uptTo before score in ReqExclBulkScorer#score. #14062

Closed
wants to merge 1 commit into from

Conversation

vsop-479
Copy link
Contributor

Description

@jpountz
Copy link
Contributor

jpountz commented Dec 15, 2024

It's not clear to me what problem this is fixing as it is legal to call bulkScorer.score(collector, acceptDocs, NO_MORE_DOCS, NO_MORE_DOCS).

@vsop-479
Copy link
Contributor Author

vsop-479 commented Dec 16, 2024

it is legal to call bulkScorer.score(collector, acceptDocs, NO_MORE_DOCS, NO_MORE_DOCS).

Thanks for reviewing @jpountz . Do you think we can return NO_MORE_DOCS immediately when min is NO_MORE_DOCS in BulkScorer#score?

@jpountz
Copy link
Contributor

jpountz commented Dec 16, 2024

This would be correct, but I don't think we should do it. If there is a DocIdSetIterator that is slow at advance(NO_MORE_DOCS), this is where we should add a special check.

@vsop-479
Copy link
Contributor Author

I added this check in ReqExclBulkScorer#score because i found upTo would be NO_MORE_DOCS after the loop in some case, e.g: max is NO_MORE_DOCS, and result in call req.score(collector, acceptDocs, NO_MORE_DOCS, NO_MORE_DOCS).

Maybe it is useless, I will close it.

@vsop-479 vsop-479 closed this Dec 17, 2024
@vsop-479 vsop-479 deleted the check_min_before_score branch December 17, 2024 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants