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

Expand objects in explain output

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 0.7.7, 0.8.0, 0.8.1
    • 0.10.0
    • CLI Module, Embedded Shell
    • None
    • Not Needed
    • Iteration Yucca

    Description

      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
          }
        }
      ]);
      

      Attachments

        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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: