Start a new topic

Error Using nearSphere in kinvey-sdk java project


I face the following kinvey error when I try to use the nearSphere method from kinvey-sdk java project:

om.kinvey.business_logic.collection_access.MongoRequest$HttpResponse parseAsListMap: parseAsListMap.body: {"error":"KinveyInternalErrorRetry","description":"The Kinvey server encountered an unexpected error. Please retry your request","debug":"can't find any special indices: 2d (needs index), 2dsphere (needs index), for: { brandid: \"1\", location: { $nearSphere: [ 55.173419, 25.095782 ], $maxDistance: 5 } }"}

Any advices about that ?!
1 Comment

Kinvey's location queries only work on the _geoLoc attribute of any collection. This error occurs because your location field is not indexed for geolocation queries.

For more information on location querying, see our location guide
Login or Signup to post a comment