Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1163

find.sort by date does not sort

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 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

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            tkalatz Fanis Kalatzis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: