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

      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

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

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            enthusiast Sulbigar Shanawaz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              8 years, 37 weeks, 2 days ago