ensureIndex() on existing text index should not error

XMLWordPrintableJSON

    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > db.a.drop()
      true
      > db.a.insert({a: 'apple banana'})
      > db.a.insert({a: 'apple apple apple apple'})
      > db.a.ensureIndex({a: 'text'})
      > db.a.ensureIndex({a: 'text'})
      {
              "err" : "Trying to create an index with same name a_text with different key spec { a: \"text\" } vs existing spec { _fts: \"text\", _ftsx: 1 }",
              "code" : 16850,
              "n" : 0,
              "connectionId" : 1,
              "ok" : 1
      }
      

              Assignee:
              J Rassi (Inactive)
              Reporter:
              Mathias Stearn
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: