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

No index support for filtering on array fields inside $expr operator

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 3.6.4
    • Fix Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Operating System:
      ALL

      Description

      I have a collection containing the following documents:

      The index below is defined:

      I'm testing an aggregation with a single $match stage:

      It returns the second document as expected, but without index support:

      I discovered this strange behavior when testing a $lookup stage with an internal pipeline, where $expr operator is a must.

      BTW - I'm aware of this issue. I have tested non-array fields and indeed indexes are used for them.

        Attachments

        1. image-2018-07-24-17-12-31-999.png
          image-2018-07-24-17-12-31-999.png
          16 kB
        2. image-2018-07-24-17-13-14-601.png
          image-2018-07-24-17-13-14-601.png
          2 kB
        3. image-2018-07-24-17-22-03-862.png
          image-2018-07-24-17-22-03-862.png
          8 kB
        4. image-2018-07-24-17-23-28-706.png
          image-2018-07-24-17-23-28-706.png
          12 kB

          Issue Links

            Activity

              People

              Assignee:
              nick.brewer Nick Brewer
              Reporter:
              cbartosiak Cezary Bartosiak
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: