Skip to content

Skip setting vector search limit if unlimited. #4963

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

Closed
christophstrobl opened this issue May 7, 2025 · 0 comments
Closed

Skip setting vector search limit if unlimited. #4963

christophstrobl opened this issue May 7, 2025 · 0 comments
Assignees
Labels
type: task A general task

Comments

@christophstrobl
Copy link
Member

Using Limit.unlimited() will result in an error when preparing the raw aggregation stage as we cannot read the max from an unlimited Limit, so we're going to skip setting the value, relying on server side command validation.

Applying defaults in case of unlimited at this point does not seem to be a viable option given the various restrictions regarding vector search, like:

  • limit must not exceed numCandidates
  • numCandidates cannot be larger than 10.000 (rules out eg. Integer.MAX)
  • numCandidates should be 20 x limit (so if we invert this and calculate limit from numCandidates we might end up with a very low value.
  • ...
@christophstrobl christophstrobl added this to the 4.5 GA (2025.0.0) milestone May 7, 2025
@christophstrobl christophstrobl self-assigned this May 7, 2025
@christophstrobl christophstrobl added the type: task A general task label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

1 participant