distinct doesn't use index to distinct multikey dotted fields

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 4.1.10
    • Affects Version/s: 2.4.10, 2.6.3, 3.0.14, 3.2.10, 3.5.13
    • Component/s: Index Maintenance
    • Fully Compatible
    • ALL
    • v4.0, v3.6
    • Query 2019-03-11, Query 2019-03-25, Query 2019-04-08
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Had a compound index on

      { "lineitems.returnflag":1, "lineitems.linestatus":1 }
      

      where lineitems is an array.

      Did db.orders.distinct("lineitems.returnflag") which caused a collection scan.

      Non-multikey correctly used the index.

              Assignee:
              Ian Boros
              Reporter:
              Asya Kamsky
              Votes:
              17 Vote for this issue
              Watchers:
              27 Start watching this issue

                Created:
                Updated:
                Resolved: