Skip to content

Conversation

mccullocht
Copy link
Contributor

@mccullocht mccullocht commented Aug 1, 2025

Return a little extra information from the bulkScore() as this will allow callers to skip results that are
below the minimum similarity needed to appear in the result set. Utilize this in hnsw and exhaustive search
to skip any topN heap manipulation for any bulk scored batches that do not meet the minimum score.

See #14013

Copy link
Contributor

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

@github-actions github-actions bot added the Stale label Aug 16, 2025
@benwtrent
Copy link
Member

Yeah! This is what I had in mind. I would expect the underlying bulk scorers should be able to keep track of their max score pretty easily (without much overhead), allowing for the caller to bypass looping over uncompetitive scores

@mccullocht mccullocht force-pushed the bulk-vector-score-max branch from 4fe46c4 to 8dee377 Compare August 25, 2025 17:22
Copy link
Contributor

This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR.

@mccullocht mccullocht force-pushed the bulk-vector-score-max branch from 8dee377 to 9cbf226 Compare August 25, 2025 17:37
Copy link
Contributor

This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR.

@mccullocht
Copy link
Contributor Author

Integrated this into the new off heap bulk scorers.

My intuition was that I'd want to use vector instructions for this but layering it is kind of tricky since we don't want to use the vector API in any public interfaces. We could expose a VectorUtil.arrayMax() but it might be faster to use scalar instructions as we traverse the array.

@github-actions github-actions bot removed the Stale label Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants