DBCursor.hasNext malfunctioned with complex query and batchSize specified

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.11.1
    • Component/s: API, Query Operations
    • Environment:
      server version: 2.4.3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      when we issue a complex query with batchSize (50)
      the result should be return 200 records,
      and DBCursor.size() return the same

      but, while loop break after 50 times loop
      while(cursor.hasNext()) {
      cursor.next();
      // do something...
      }

      if we leave batchSize unspecfied, then cursor.hasNext() works fine

      is this a bug or limitation ?

      complex query:
      { "$and" : [

      { "Level" : 8}

      ,

      { "Visible" : true}

      , { "Status" : { "$ne" : "DELETED"}} ,

      { "VersionId" : -1}

      , { "PositionIds" : { "$in" : [ 12]}}]}

              Assignee:
              Unassigned
              Reporter:
              John Doe
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: