Skip to content

Skip setting vector search limit if unlimited. #4963

Closed
@christophstrobl

Description

@christophstrobl

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions