Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1140

DBCursor.hasNext malfunctioned with complex query and batchSize specified

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.11.1
    • API, Query Operations
    • server version: 2.4.3

    Description

      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]}}]}

      Attachments

        Activity

          People

            Unassigned Unassigned
            johndoe2014 John Doe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: