-
Type: Task
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.2.33
-
Component/s: None
-
Environment:node database version 3.3 on machine 192.168.1.6 on ubuntu 16.04
node.js client on machine 192.168.1.1 with node version 6 on ununtu 16.04
-
Empty show more show less
The node.js client app needs to collect the documents sorted by date using cursor.each
and find({ userid: 1 }).sort({ date: 1 }). There is an ascending index for the date field.
The cursor.each returns nothing and timeouts. The cursor.count works ok.
There are 14681 documents for the userid=1 and the corresponding total export is 80MB (some documents are large).
Cases:
if i limit the query it works: ex find({ userid: 1 }).sort({ date: 1 }).limit(4550)
if i limit to more than 4550 documents no document are returned (same as without limit).
if i query and sort without limit on another field (e.x. userid) all docs are returned.
if i query and sort on date using the mongo jdbc driver from a java se 8 console application all docs are returned sorted by date; this sort java app i am using now to export the sorted docs.