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

Incorrect serialization for $elemMatch $not $ne

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.6.15, 4.0.0, 4.0.7, 4.2.0, 4.3.1
    • 4.2.3, 4.3.3, 4.0.15, 3.6.18
    • 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

    Description

      > 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
      }
      > 
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: