Pass viewPipeline to extension for validation

XMLWordPrintableJSON

    • Query Integration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, we only pass the viewName across the API boundary for extension stages as that's needed by the $vectorSearchExtension. We originally decided not to pass the viewPipeline across the boundary as it's a more complex structure and can be applied to DocumentSourceInternalSearchIdLookup server-side.

      After turning on featureFlagExtensionViewsAndUnionWith, we discovered that we lost view pipeline validation that was previously handled by DocumentSourceVectorSearch (specifically, mongot stages are disallowed in the view pipeline). While we could check whether an extension stage is an ExtensionVectorSearch stage in DocumentSourceExtensionOptimizable, this is brittle and should ideally be handled by the extension itself. We should consider passing the viewPipeline across the extension boundary so that the extension can take care of validation if it needs it.

            Assignee:
            Will Buerger
            Reporter:
            Lynne Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: