-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Geopoint near and withinKilometer internal error #621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Did you make a separate class called "User" or should this be "_User" (the special users class on Parse)... Check the indexes on mongolab and see if there's a 2d index on the location column? |
I'm still using the special user class from Parse, I just migrated the db to mongolab. |
I also observed "internal error" after migrating my database to mLab. However, the problem was indeed a missing 2d index on the relevant key in the database. After adding the 2d index via the mLabDB-->Indexes-->Add Index button in mLab UI the query.whereWithinMiles() method began working as expected and returning results instead of the error. If your result sets are empty then be sure to call e.printStackTrace() in the "done" method of the query callback to confirm if you're encountering this condition. Note that I added new documents containing geo-spacial data to the database since migration so maybe we need to be sure to create 2d indexes going forward. Here's a snippet of the exception stack so that this error is searchable for others: 03-06 23:05:03.546: W/System.err(2137): com.parse.ParseRequest$ParseRequestException: internal error |
Hi,
We have migrated the DB to MongoLab and now this code show an internal error.
var userGeoPoint = new Parse.GeoPoint(latitude, longitude);
var query = new Parse.Query("User");
query.near("location", userGeoPoint);
query.limit(10);
query.find({
success: function(placesObjects) {
console.log("yes");
},
error:function(status) {
console.log(status);
}
});
If I comment the line with the near function or replace it with equalTo, it works without any problem.
Regards,
Ugo
The text was updated successfully, but these errors were encountered: