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

[Mongosh]Add support for the new type field when creating search indexes for runCommand, createSearchIndex, and createSearchIndexes

    • Type: Icon: Story Story
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.3
    • Affects Version/s: None
    • Component/s: None
    • 2
    • Iteration Pterodactyl, Iteration Qantassaurus
    • Needed
    • Hide

      db.collection.createSearchIndex() and db.collection.createSearchIndexes() use extended syntax to allow specifying an index type.

      In particular, the createSearchIndex method now takes the argument forms:

      db.<collection>.createSearchIndex(
         <name>,
         {
            <definition>
         }
      )
      

      (current) and

      db.<collection>.createSearchIndex(
         <name>,
         <type>,
         {
            <definition>
         }
      )
      

      (new)

      (Syntax document: https://docs.google.com/document/d/1X5xvoz3HGgCHe14zARacT50EpI33DvdjKxVrnbtkXNM/edit#heading=h.bn1t56cck2qq)

      Show
      db.collection.createSearchIndex() and db.collection.createSearchIndexes() use extended syntax to allow specifying an index type . In particular, the createSearchIndex method now takes the argument forms: db.<collection>.createSearchIndex( <name>, { <definition> } ) (current) and db.<collection>.createSearchIndex( <name>, <type>, { <definition> } ) (new) (Syntax document: https://docs.google.com/document/d/1X5xvoz3HGgCHe14zARacT50EpI33DvdjKxVrnbtkXNM/edit#heading=h.bn1t56cck2qq )

      Add support for the new type field when creating search indexes using createSearchIndex, and createSearchIndexes. Also, increase compatibility with older server versions by omitting type for runCommand if type: search is provided (or implied by default).

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            sara.akram@mongodb.com Sara Akram (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: