Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-22861

2dsphere index cannot be created with lowercase "point"

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.3.0, 3.3.2
    • Component/s: Geo
    • Labels:
      None
    • ALL
    • Hide
      //step1
      db.myCollection.insert({
      //some details...
      loc:{
      type:"point",
      coordinates:[0,0]}
      })
      //step2
      db.myCollection.createIndex({loc:"2dsphere"})
      //{
          "ok" : 0,
          "errmsg" : "Can't extract geo keys: { _id: \"0018m1tvHg\", loc: { type: \"point\", coordinates: [ 0.0, 0.0 ] } }  unknown GeoJSON type: { type: \"point\", coordinates: [ 0.0, 0.0 ] }",
          "code" : 16755
      }
      
      Show
      //step1 db.myCollection.insert({ //some details... loc:{ type:"point", coordinates:[0,0]} }) //step2 db.myCollection.createIndex({loc:"2dsphere"}) //{ "ok" : 0, "errmsg" : "Can't extract geo keys: { _id: \"0018m1tvHg\", loc: { type: \"point\", coordinates: [ 0.0, 0.0 ] } } unknown GeoJSON type: { type: \"point\", coordinates: [ 0.0, 0.0 ] }", "code" : 16755 }

      the geolocation data is exactly as in the examples on mongo documents but database cannot create index on that

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            nikosEfthias nikos efthias [X]
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: