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

2dsphere index cannot be created with lowercase "point"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.3.0, 3.3.2
    • Geo
    • 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 }

    Description

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: