Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-583

Expand objects in explain output

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.10.0
    • Affects Version/s: 0.7.7, 0.8.0, 0.8.1
    • Component/s: CLI Module, Embedded Shell
    • Labels:
      None
    • Not Needed
    • Iteration Yucca

      The Search team recently released support for explain() as a beta for $search queries.

      I gave it a quick try and noticed that we are not expanding some of the objects in the explain plan output (see screenshots).

      We should fix that.

      To test this, I created a search index on the sample_mflix.movies collection in our test cluster. Here are a couple of explain examples:

      use('sample_mflix');
      db.movies.explain("executionStats").aggregate([{
          $search: {
            index: 'mflix-movies-fts',
            text: {
              query: 'Kill',
              path: 'title',
              fuzzy: {}
            }
          }
        },
        {
          /**
           * specifications: The fields to
           *   include or exclude.
           */
          $project: {
            _id: 0,
            title: 1
          }
        }
      ]);
      
      use('sample_mflix');
      db.movies.explain("queryPlanner").aggregate([{
          $search: {
            index: 'mflix-movies-fts',
            text: {
              query: 'Kill',
              path: 'title'
            }
          }
        },
        {
          /**
           * specifications: The fields to
           *   include or exclude.
           */
          $project: {
            _id: 0,
            title: 1
          }
        }
      ]);
      

        1. image-2021-02-08-11-44-07-679.png
          image-2021-02-08-11-44-07-679.png
          118 kB
        2. image-2021-02-08-11-44-30-355.png
          image-2021-02-08-11-44-30-355.png
          139 kB
        3. screenshot-1.png
          screenshot-1.png
          6 kB
        4. Screen Shot 2021-02-23 at 4.28.37 PM.png
          Screen Shot 2021-02-23 at 4.28.37 PM.png
          191 kB

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            massimiliano.marcon@mongodb.com Massimiliano Marcon
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: