Details
-
Bug
-
Resolution: Unresolved
-
Major - P3
-
None
-
4.2.1
-
Query Optimization
-
ALL
Description
wildcardProjection does not work for wildcard indexes on a subtree. For example:
db.getCollection("companies").createIndex( { "representatives.$**" : 1 }, {wildcardProjection: {"representatives.niceNames": 0}} );
|
Gives the error:
{
|
"ok" : 0.0,
|
"errmsg" : "The field 'wildcardProjection' is only allowed when 'key' is {\"$**\": ±1}",
|
"code" : 9,
|
"codeName" : "FailedToParse"
|
}
|
Since the doc does not mention any such restriction, I am assuming it's a bug.
Attachments
Issue Links
- is documented by
-
DOCS-13227 Add wildcardProjection warning
-
- Closed
-
- is related to
-
SERVER-391 Support both include and exclude on field filters
-
- Backlog
-
-
SERVER-48897 Allow sub-field matching in Wildcard indexes
-
- Backlog
-