Geospatial Queries problem
Hi.
Following the docs;
http://docs.appery.io/documentation/b...
I have tested the query - where - id: someid and so on, no problem there, but the nearsphere is not working at all.
I am trying to retrieve locations based on geopoints. However, I only get "index error", when I Test the query service.
DB COL = location:
codelocation
(geopoint),idx/code
Where:
code{ "location" : { "$nearSphere" : [16.373, 48.208], "$maxDistanceInKilometers" : 550 } }/code
Error msg:
code{
"status":"500 Internal Server Error",
"url":"https://api.appery.io/rest/1/db/collections/events",
"response":{
"code":"DBSQ000",
"description":"can't find any special indices: 2d (needs index), 2dsphere (needs index), for: { location: { $nearSphere: [ 16.373, 48.208 ], $maxDistance: 0.08632867681682624 }, $and: [ { $or: [ { acl: null }, { acl.*.read: true } ] } ] }"
}
}/code
After some googling, I found that there might be an index problem on the col "location" in DB. Could some of the support staff test out the approach from docs and make modifications if they are wrong!?!?!
Please help, thanks!
-Tom