Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7987

Combination of geospatial and sort queries causes skip and limit to fail

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.8, 2.2.0
    • Component/s: Geo, Querying
    • None
    • Environment:
      Tested on two different installs on Ubuntu and Mac OS X.
    • ALL
    • Hide

      Attached are:

      • a sample BSON dump (16 elements)
      • two sample queries (to be run in Mongo shell) exhibiting the issue. The only difference between those two queries is the skip() parameter. (First page, second page).
      Show
      Attached are: a sample BSON dump (16 elements) two sample queries (to be run in Mongo shell) exhibiting the issue. The only difference between those two queries is the skip() parameter. (First page, second page).

      I need to perform a geospatial query while sorting on another attribute, and skip/limit results so as to paginate search results.

      (For context, the app in question is http://jemem.fr/recherche/coach/sportif/paris – it's a Yelp-like interface where you search for POIs near a geocoded location, sorted by a parameter – here Reviews, Distance, or Price – while paginating results. Warning, it's in French!).

      Skip and limit fail, i.e. the query results are not properly paginated (some items are repeated when you change page, while some other items never show up).

        1. dump.zip
          10 kB
        2. testcase.js
          0.4 kB

            Assignee:
            Unassigned Unassigned
            Reporter:
            julien_c Julien Chaumond
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: