From 73770db06f6a696d24fdef9ae5a06a3edfb0b8bd Mon Sep 17 00:00:00 2001 From: Luke Lovett Date: Fri, 3 Mar 2017 14:43:34 -0800 Subject: [PATCH] Link to createIndexes command from create_indexes documentation. Fix markup for Collation class in IndexModel documentation. --- pymongo/collection.py | 4 +++- pymongo/operations.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pymongo/collection.py b/pymongo/collection.py index 95980fc07..fcee20c04 100644 --- a/pymongo/collection.py +++ b/pymongo/collection.py @@ -1367,7 +1367,7 @@ class Collection(common.BaseObject): - `indexes`: A list of :class:`~pymongo.operations.IndexModel` instances. - .. note:: `create_indexes` uses the ``createIndexes`` command + .. note:: `create_indexes` uses the `createIndexes`_ command introduced in MongoDB **2.6** and cannot be used with earlier versions. @@ -1379,6 +1379,8 @@ class Collection(common.BaseObject): Apply this collection's write concern automatically to this operation when connected to MongoDB >= 3.4. .. versionadded:: 3.0 + + .. _createIndexes: https://docs.mongodb.com/manual/reference/command/createIndexes/ """ if not isinstance(indexes, list): raise TypeError("indexes must be a list") diff --git a/pymongo/operations.py b/pymongo/operations.py index 5f47edcd5..e5af4c833 100644 --- a/pymongo/operations.py +++ b/pymongo/operations.py @@ -225,8 +225,8 @@ class IndexModel(object): be a UTC datetime or the data will not expire. - `partialFilterExpression`: A document that specifies a filter for a partial index. - - `collation`: An instance of `~pymongo.collation.Collation` that - specifies the collation to use in MongoDB >= 3.4. + - `collation`: An instance of :class:`~pymongo.collation.Collation` + that specifies the collation to use in MongoDB >= 3.4. See the MongoDB documentation for a full list of supported options by server version.