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

db.collection.getIndexes() output no longer pretty printed

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 0.14.0
    • Affects Version/s: None
    • Component/s: CLI Module
    • None
    • 2
    • Iteration Chicago
    • Needed
    • Hide

      There is a new `inspectCompact` config setting. It corresponds to the `compact` option in https://nodejs.org/api/util.html#util_util_inspect_object_options.

      Concretely, one can use config.set('inspectCompact', false); to make mongosh print every field of result objects/documents on its own line, instead of grouping multiple fields together.

      Show
      There is a new `inspectCompact` config setting. It corresponds to the `compact` option in https://nodejs.org/api/util.html#util_util_inspect_object_options . Concretely, one can use config.set('inspectCompact', false); to make mongosh print every field of result objects/documents on its own line, instead of grouping multiple fields together.

      Problem Description 

      The output from db.collection.getIndexes() is no longer pretty printed. (see screenshots)

      Steps to Reproduce

      Create an index on a collection 

      Run db.collection.getIndexes()

      Expected Results

      Pretty printed index information

      Actual Results

      Single line, compact index information

      Additional Notes

        1. mongosh.png
          39 kB
          Dave Cuthbert
        2. mongo-shell.png
          46 kB
          Dave Cuthbert
        3. Screen Shot 2021-04-09 at 1.56.42 PM.png
          16 kB
          Dave Cuthbert
        4. Screen Shot 2021-04-09 at 1.57.11 PM.png
          10 kB
          Dave Cuthbert

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            dave.cuthbert@mongodb.com Dave Cuthbert (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: