我有一张城市表,表的一条记录如下 { “_id” : ObjectId(“53fd8551cbbcd42488d50a5c”), “CODE” : 1003.0, “XCODE” : 350123.0, “SNAME” : "XX市", “geom” : { “type” : "Polygon", “coordinates” : [[[119.73287466488176, 26.440590523499242], [119.73237364734781, 26.441790564403114], [119.73263066139998, 26.442922591682265], [119.73313567644884, 26.443598615160887], [119.73363669240553, 26.443597614479636], [119.73438870944558, 26.443592610144869], [119.73538473647521, 26.442680586017158], [119.73537973601451, 26.441561553344538], [119.73437370463746, 26.440886533259395], [119.73287466488176, 26.440590523499242]]] }, “ELEV” : 0.0, “XNAME” : "YY县", “ID” : 6.0 }
创建空间索引 db.native.ensureIndex({’geom.coordinates’:’2d’}) “errmsg” : "geo values must be ‘legacy coordinate pairs’ for 2d indexes Mongodb版本2.6.4。特来求助,为什么创建索引失败呢?