MongoDB Geospatial Query Count Issue (Always 100) -


it appears there issue count operation on geospatial query contains more 100 results. if run following query still count of 100 no matter what.

db.locations.find({"loc":{$nearsphere:[50, 50]}}).limit(1000).count() 

i understand default size limit on query uses "near" syntax 100 appears cannot return more that. doing wrong or there workaround this?

try "within" instead of "near". works me,

center = [50, 50]; radius = 1/111.12; //convert km.  db.places.count({"loc" : {"$within" : {"$center" : [center, radius]}}}) 

i found @ https://jira.mongodb.org/browse/server-856


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -