Some Document Can Not Be Found By Mongo Java Client

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      Some Document Can Not Be Found By Mongo Java Clinet。

      client version:4.5.1

      server version: 4.2.5

      Java Code:

      ```
      long l = database.getCollection("currency_log").countDocuments( Filters.and( Filters.gte("time", 1647792000), Filters.lt("time", 1647878400) ) );
      ```

      return count is :588177

      Query Ql In Tool:NoSQLBooster for MongoDB

      ```
      db.currency_log.find({time:{"$gte":1647792000,"$lt":1647878400}}).count()
      ```

      return count is :588178

       

      Then I Find The Lose Document is 

      ```
      db.currency_log.find({_id:ObjectId("62388633f12eb410f0e6d922")})
      ```

      The I just find Document By ObjectId By Java Mongo Driver , But Still Not Find Id;

      Java Code is below

      ```
      long count = database.getCollection("currency_log").countDocuments(Filters.eq("_id", new ObjectId("62388633f12eb410f0e6d922")));
      ```

       

       

            Assignee:
            Ross Lawley
            Reporter:
            仲鲍 杨
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: