Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15221

Indicate that ONLY specific aggregation stages an utilize indexes

      In https://www.mongodb.com/docs/manual/core/aggregation-pipeline-optimization/#std-label-aggregation-pipeline-optimization-indexes-and-filters the instructions are not explicit, and the resulting ambiguity can confuse users who are unsure as to why their pipeline didn't use an index.

      The query planner analyzes an aggregation pipeline to determine if indexes can be used to improve pipeline performance.

      The following list shows some pipeline stages that can use indexes:

      This should be reworded as:

      The query planner analyzes an aggregation pipeline to determine if indexes from the collection targeted by the aggregate command can be used to improve pipeline performance. Only the first pipeline stage can benefit from indexes, and only if that stage is one of the following:

            Assignee:
            nick.villahermosa@mongodb.com Nick Villahermosa
            Reporter:
            alex.bevilacqua@mongodb.com Alex Bevilacqua
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 21 weeks, 5 days ago