@@ -1931,10 +1931,13 @@ def create_index(self, keys, session=None, **kwargs):
1931
1931
this collection after <int> seconds. The indexed field must
1932
1932
be a UTC datetime or the data will not expire.
1933
1933
- `partialFilterExpression`: A document that specifies a filter for
1934
- a partial index.
1934
+ a partial index. Requires server version >=3.2.
1935
1935
- `collation` (optional): An instance of
1936
1936
:class:`~pymongo.collation.Collation`. This option is only supported
1937
1937
on MongoDB 3.4 and above.
1938
+ - `wildcardProjection`: Allows users to include or exclude specific
1939
+ field paths from a `wildcard index`_ using the { "$**" : 1} key
1940
+ pattern. Requires server version >= 4.2.
1938
1941
1939
1942
See the MongoDB documentation for a full list of supported options by
1940
1943
server version.
@@ -1943,8 +1946,6 @@ def create_index(self, keys, session=None, **kwargs):
1943
1946
option is silently ignored by the server and unique index builds
1944
1947
using the option will fail if a duplicate value is detected.
1945
1948
1946
- .. note:: `partialFilterExpression` requires server version **>= 3.2**
1947
-
1948
1949
.. note:: The :attr:`~pymongo.collection.Collection.write_concern` of
1949
1950
this collection is automatically applied to this operation when using
1950
1951
MongoDB >= 3.4.
@@ -1972,6 +1973,8 @@ def create_index(self, keys, session=None, **kwargs):
1972
1973
for the drop_dups and bucket_size aliases.
1973
1974
1974
1975
.. mongodoc:: indexes
1976
+
1977
+ .. _wildcard index: https://docs.mongodb.com/master/core/index-wildcard/#wildcard-index-core
1975
1978
"""
1976
1979
keys = helpers ._index_list (keys )
1977
1980
name = kwargs .setdefault ("name" , helpers ._gen_index_name (keys ))
0 commit comments