Description
All drivers must support the new "wildcard" index type which will be added in MongoDB 4.2. Wildcard indexes are defined like this:
{
|
key: {
|
"$**": 1
|
}
|
}
|
A single subtree can be indexed like so:
{
|
key: {
|
"<field>.$**": 1
|
}
|
}
|
Projections are also possible using a new wildcardProjection index model option:
{
|
key: {
|
"$**": 1
|
},
|
name: "foo",
|
“wildcardProjection”: {
|
"name": 1,
|
"category": 1,
|
"cost": 1,
|
"descriptors": 1
|
}
|
}
|
See the server syntax document for details.
Attachments
Issue Links
- depends on
-
CDRIVER-2842 Support index all paths
-
- Closed
-
-
CSHARP-2408 Support index all paths
-
- Closed
-
-
CXX-1661 Support index all paths
-
- Closed
-
-
JAVA-3014 Support index all paths
-
- Closed
-
-
MOTOR-272 Support index all paths
-
- Closed
-
-
NODE-1696 Support index all paths
-
- Closed
-
-
RUBY-1484 Support index all paths
-
- Closed
-
-
RUST-112 Support index all paths
-
- Closed
-
-
GODRIVER-906 Support wildcardProjection index option
-
- Closed
-
-
PYTHON-1789 Support index all paths: update documentation
-
- Closed
-