Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-100443

Metadata dependency tracking should account for metadata-destroying stages

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration

      Queries like

      [{$project: {$meta: "textScore"}}]
      

      return a failure indicating that "the query requires text score metadata, but it is not available".

      However, a query like

      [{$match: {$text: <>}}, {$group: {_id: null}}, {$project: {$meta: "textScore"}}]
      

      succeeds, even though the "textScore" is not available since the $group destroys per-document metadata.

      DepsTracker already tracks which stages in a pipeline will preserve or destroy metadata, so we should account for that when deciding whether or not to return an error.

            Assignee:
            Unassigned Unassigned
            Reporter:
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: