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

$near query with limit > 100 only provides 100 input documents to map/reduce.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.9.1
    • Component/s: MapReduce
    • None
    • Query
    • ALL

      Repro steps:

      • mongorestore the attached database
      • Run the attached JS script.

      Output should look like this:

      Count of $near query results:
      100
      Count of $near query results with limit(500):
      500
      Results from map/reduce with no limit:

      {
      	"result" : "output",
      	"timeMillis" : 62,
      	"counts" : {
      		"input" : 100,
      		"emit" : 100,
      		"output" : 2
      	},
      	"ok" : 1
      }
      

      Results from map/reduce with limit(10):

      {
      	"result" : "output",
      	"timeMillis" : 4,
      	"counts" : {
      		"input" : 10,
      		"emit" : 10,
      		"output" : 1
      	},
      	"ok" : 1
      }
      

      Results from map/reduce with limit(500):

      {
      	"result" : "output",
      	"timeMillis" : 7,
      	"counts" : {
      		"input" : 100,
      		"emit" : 100,
      		"output" : 2
      	},
      	"ok" : 1
      }
      

        1. geo.tgz
          945 kB
        2. near_m_r_repro.js
          1.0 kB

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: