Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-5995

$in operation on an indexed array field along with $ projection is failing in mongodb 2.6

    XMLWordPrintable

    Details

    • # Replies:
      12
    • Last comment by Customer:
      true

      Description

      I have the following data structure which has an indexed field as an array of strings.

      <QUERY IN ATTACHMENT>

      The below query was working fine in mongodb 2.4.

      { "docKey" : { "$in" : ["M06001XXXX45378CED", "M06001ZZZ45378CED"] }, "serviceGroupCode.estimateCategories.code" : "SEC02" }, { "serviceGroupCode.estimateCategories.$" : 1 }
      

      But after upgrading to mongo db 2.6, this query is failing.
      The above query works fine only if the $in operation consists of the first array element. Otherwise, it results is projection failure.

      I initially thought that the indexing would have failed for other array elements but they work fine when queried alone without the $ projection.

      I could not find any documentation that touches impact to these operation. Hence it would be of great help if this issue can be looked upon and a resolution can be provided at the earliest.

      Thank You,
      Sulbigar S

        Attachments

        1. sample_document_2.query
          31 kB
        2. sample_document.query
          30 kB

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                4 years, 28 weeks, 2 days ago
                Date of 1st Reply: