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

doing a geo $near search with other fields in the query makes it so the results can't be sorted

    • Type: Icon: Improvement Improvement
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.4.4, 1.5.6
    • Component/s: Geo, Querying
    • None
    • Environment:
      os: Windows 7

      creating an index like this:

      db.places.ensureIndex(

      { loc : "2d", foo: 1 }

      )

      then querying on the index like this fails return the expected result:

      db.places.find({loc: {$near: [37.775,-122.4183333]},foo: {$gte: 100}}).sort(

      {foo:1}

      );

      if you take out the second part of the query (the foo: {$gte: 100}) but leave in the sort then it returns the expected result.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            jaymon Jay Marcyes
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: