Implement the extension $vectorSearch "limit" Optimization

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • 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

            Assignee:
            Adithi Raghavan
            Reporter:
            Adithi Raghavan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: