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

Incorrect serialization for $elemMatch $not $ne

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.3, 4.3.3, 4.0.15, 3.6.18
    • Affects Version/s: 3.6.15, 4.0.0, 4.0.7, 4.2.0, 4.3.1
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v4.2, v4.0, v3.6
    • Query 2019-10-21, Query 2019-11-04, Query 2019-11-18, Query 2019-12-02

      > db.test.explain().find({ "a" : { "$elemMatch" : { "$not" : { "$ne" : 400 } }}})
      {
      	"queryPlanner" : {
      		"plannerVersion" : 1,
      		"namespace" : "test.test",
      		"indexFilterSet" : false,
      		"parsedQuery" : {
      			"a" : {
      				"$elemMatch" : {
      					"0" : {
      						"" : {
      							"$not" : {
      								"$eq" : 400
      							}
      						}
      					}
      				}
      			}
      		},
      		"queryHash" : "53768594",
      		"planCacheKey" : "6A5A7DF0",
      		"winningPlan" : {
      			"stage" : "COLLSCAN",
      			"filter" : {
      				"a" : {
      					"$elemMatch" : {
      						"0" : {
      							"" : {
      								"$not" : {
      									"$eq" : 400
      								}
      							}
      						}
      					}
      				}
      			},
      			"direction" : "forward"
      		},
      		"rejectedPlans" : [ ]
      	},
      	"ok" : 1
      }
      > 
      

            Assignee:
            charlie.swanson@mongodb.com Charlie Swanson
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: