Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12640

Distinct against array element returns 0 results

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.0-rc0
    • Affects Version/s: 2.5.5
    • Component/s: None
    • None
    • Fully Compatible
    • ALL

      When using db.foo.distinct("a.0"), server 2.4 returned results where server 2.5.5 returns an empty set.

      db.drop();
      db.foo.insert({a:[0,1]});
      db.foo.insert({a:[1,2]});
      
      db.foo.distinct("a.0");
      // should return [0, 1], but returns empty with server 2.5.5
      
      

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            craig.wilson@mongodb.com Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: