你好,我在 _Installation的class里加上一个geopoint的field叫作 lastKnownLocation,以便之后推送给某个地点附近的装置。但在云引擎中使用
var query = new AV.Query('_Installation');
query.withinKilometers('lastKnownLocation', [SOME LOCATION], [SOME DISTANCE]);
则会返回以下错误:
{ code: 303,
message: 'Fail to execute operation on storage. Command failed with error 2: \'failed on : SHARD01\' on server localhost:27020. The full response is { "shards" : { }, "cause" : { "errmsg" : "exception: error processing query: ns=DUQ8BnlaIscimKTp3dg1LBTF-MdYXbMMI._Installation limit=0 skip=0\\nTree: $and\\n $not\\n nearbyMessagePush == false\\n GEONEAR field=lastKnownLocation maxdist=0.000313922 isNearSphere=1\\nSort: {}\\nProj: {}\\n planner returned error: unable to find index for $geoNear query", "code" : 2, "ok" : 0.0, "$gleStats" : { "lastOpTime" : { "$timestamp" : { "t" : 1461587307, "i" : 8 } }, "electionId" : { "$oid" : "5714a03102ba06ebc00dacdf" } } }, "code" : 2, "ok" : 0.0, "errmsg" : "failed on : SHARD01" }' }
请问Installation是否支持使用GeoPoint作为query的条件?貌似是缺少了 indexing?
-
创建时间
16年4月25日
-
最后回复
16年4月26日
-
3
回复
-
927
浏览
-
3
用户
-
1
赞