[DOCS-14827] When specifying the "on" field when using $merge, clarify that fields that use a partial index with a unique constraint aren't allowed Created: 28/Sep/21  Updated: 13/Nov/23  Resolved: 12/Oct/21

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

Type: Task Priority: Minor - P4
Reporter: Edwin Zhou Assignee: Naomi Pentrel (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-60104 $merge not working with partial index Closed
Participants:
Days since reply: 2 years, 17 weeks, 1 day ago
Epic Link: DOCSP-15042

 Description   

Currently, when we specify the "on" field using a field that is partially indexed with a unique constraint, we throw an error informing the user that an index isn't found.

Error: command failed: {
	"ok" : 0,
	"errmsg" : "Cannot find index to verify that join fields will be unique",
	"code" : 51183,
	"codeName" : "Location51183"
} : aggregate failed :

Our source indicates that a field that is partially uniquely indexed is insufficient as a unique index.

It's not clear in our $merge documentation that a partially indexed field is insufficient for specifying "on" in $merge.



 Comments   
Comment by Githook User [ 12/Oct/21 ]

Author:

{'name': 'Naomi Pentrel', 'email': '5212232+npentrel@users.noreply.github.com', 'username': 'npentrel'}

Message: DOCS-14827: $merge and partial indexes
Branch: v5.0
https://github.com/mongodb/docs/commit/62d160ba7525c88b80b599ef2ea46491aa09211c

Comment by Githook User [ 12/Oct/21 ]

Author:

{'name': 'Naomi Pentrel', 'email': '5212232+npentrel@users.noreply.github.com', 'username': 'npentrel'}

Message: DOCS-14827: $merge and partial indexes
Branch: master
https://github.com/mongodb/docs/commit/b3a5267c950f4879cd53a1b4b742d8e8098419b7

Comment by Naomi Pentrel (Inactive) [ 11/Oct/21 ]

CR: https://mongodbcr.appspot.com/823440001/

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