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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 3.6.4
    • None
    • Aggregation Framework
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: