-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
-
None
1. Add this function to the API
MongoExtensionStatus* (*set_vector_search_limit_for_optimization)( const MongoExtensionLogicalStage* logicalStage, long long* extractedLimitVal);
2. Extension must set the limit used in the optimizations to the minimum of the passed limitVal and the $vectorSearch stage's provided limit.
This limit value will be used for the following optimizations:
- The extension $vectorSearch should add a $limit to its DistributedPlanLogic’s merging pipeline
- The extension $vectorSearch can use the limit to compute the numCandidates:limit ratio metric