Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2766

max_scan does not work

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Using Mongoid master.

      irb(main):046:0> User.where({}).max_scan(1).to_a().length
      => 4326
      irb(main):047:0> User.where({}).max_scan(1).explain
      => {"cursor"=>"BasicCursor", "isMultiKey"=>false, "n"=>4326, "nscannedObjects"=>4326, "nscanned"=>4326, "nscannedObjectsAllPlans"=>4326, "nscannedAllPlans"=>4326, "scanAndOrder"=>false, "indexOnly"=>false, "nYields"=>0, "nChunkSkips"=>0, "millis"=>1, "indexBounds"=>{}, "allPlans"=>[{"cursor"=>"BasicCursor", "n"=>4326, "nscannedObjects"=>4326, "nscanned"=>4326, "indexBounds"=>{}}], "server"=>"jon.local:27017"}
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            jonhyman Jon Hyman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: