createIndexes returns only index name instead of document

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Blocker - P1
    • None
    • Affects Version/s: 4.0.0
    • Component/s: Shell
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      collection.createIndexes returns the wrong value in v4.0.0, instead of returning the index spec from the server it only returns the index name as a string.  I'm filing this as a bug because the createIndexes function signature says it should return a document

      With 3.6.3 on a standalone 4.2

       

      > await c.db('test').collection('coll').createIndexes([ { name: 'index-1', key: { x: 1 } } ])
      {
        createdCollectionAutomatically: false,
        numIndexesBefore: 1,
        numIndexesAfter: 2,
        ok: 1
      }
      >

       

      With 4.0.0 on standalone 4.2

      > await c.db('test').collection('coll').createIndexes([ { name: 'index-1', key: { x: 1 } } ])
      'index-1'
      

              Assignee:
              Eric Adum (Inactive)
              Reporter:
              Anna Herlihy (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: