[DOCS-14158] Document $expr not supported with upsert Created: 26/Jan/21  Updated: 30/Oct/23  Resolved: 16/Aug/21

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Renato Riccio Assignee: Ian Fogelman
Resolution: Done Votes: 0
Labels: docs-server-onboarding, quick-win
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 2 years, 25 weeks, 2 days ago
Epic Link: DOCSP-11701

 Description   

Description

$expr is not supported in update query when upsert is used. This should be documented.

MongoDB Enterprise > db.foo.update({$expr: {$eq: ["$a","$b"]}}, {$set: {c:1}},{upsert:true})
WriteResult({
	"nMatched" : 0,
	"nUpserted" : 0,
	"nModified" : 0,
	"writeError" : {
		"code" : 224,
		"errmsg" : "$expr is not allowed in the query predicate for an upsert"
	}
})

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 16/Aug/21 ]

Author:

{'name': 'ian fogelman', 'email': 'ian.fogelman@mongodb.com', 'username': 'ianf-mongodb'}

Message: DOCS-14158 Adding blurb to cover expression operator and upsert flag.
Branch: v4.0
https://github.com/mongodb/docs/commit/5082a7ea4753dafb0bbceb20ccbfbbe6c1da3864

Comment by Githook User [ 16/Aug/21 ]

Author:

{'name': 'ian fogelman', 'email': 'ian.fogelman@mongodb.com', 'username': 'ianf-mongodb'}

Message: DOCS-14158 Adding blurb to cover expression operator and upsert flag.
Branch: v4.2
https://github.com/mongodb/docs/commit/a19e440b4b2e8eb441c9f242ed4ef82fa4e5962b

Comment by Githook User [ 16/Aug/21 ]

Author:

{'name': 'ian fogelman', 'email': 'ian.fogelman@mongodb.com', 'username': 'ianf-mongodb'}

Message: DOCS-14158 Adding blurb to cover expression operator and upsert flag.
Branch: v4.4
https://github.com/mongodb/docs/commit/6e4aced059b1451220919f23a97c4c4c9b802fdf

Comment by Githook User [ 16/Aug/21 ]

Author:

{'name': 'ian fogelman', 'email': 'ian.fogelman@mongodb.com', 'username': 'ianf-mongodb'}

Message: DOCS-14158 Adding blurb to cover expression operator and upsert flag.
Branch: master
https://github.com/mongodb/docs/commit/54df7ab5c5f21f40813498027f808e8308289805

Generated at Thu Feb 08 08:09:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.