$geoNear dbCommand and .skip() or some other method of paging?

434 views
Skip to first unread message

David D.

unread,
Sep 21, 2011, 2:23:27 PM9/21/11
to mongodb-user
I'm executing

David D.

unread,
Sep 21, 2011, 2:26:44 PM9/21/11
to mongodb-user
Oops. Let's try that again.

I'm executing a geoNear dbcommand to get geospatial indexed results
with 'dis' calculated and other stats. I want to be able to page
results so that I can give the first 30 closest results, then query
again for the next 30 results and so on and so on.

With a normal $near, this is as easy as doing .skip(30)

How can we do this with the dbcommand? I haven't been able to find an
answer in the documentation or google group, not to say it doesn't
exist...

Any help is much appreciated!



On Sep 21, 2:23 pm, "David D." <da...@grandelabs.com> wrote:
> I'm executing

Richard Kreuter

unread,
Sep 21, 2011, 3:37:11 PM9/21/11
to mongodb-user
Skipping doesn't appear to be implemented for $geoNear at present.
You might want to create an issue requesting this in our JIRA.

Regards,
Richard

David D.

unread,
Sep 22, 2011, 10:32:31 AM9/22/11
to mongodb-user
Reply all
Reply to author
Forward
0 new messages