diff --git a/doc/examples/bulk.rst b/doc/examples/bulk.rst index a01417613..5e2339549 100644 --- a/doc/examples/bulk.rst +++ b/doc/examples/bulk.rst @@ -116,7 +116,7 @@ the failure. 'upserted': [], 'writeConcernErrors': [], 'writeErrors': [{u'code': 11000, - u'errmsg': u'...E11000 duplicate key error index: bulk_example.test.$_id_ dup key: { : 4 }', + u'errmsg': u'...E11000 duplicate key error...', u'index': 1, u'op': {'_id': 4}}]} @@ -153,11 +153,11 @@ and fourth operations succeed. 'upserted': [], 'writeConcernErrors': [], 'writeErrors': [{u'code': 11000, - u'errmsg': u'...E11000 duplicate key error index: bulk_example.test.$_id_ dup key: { : 1 }', + u'errmsg': u'...E11000 duplicate key error...', u'index': 0, u'op': {'_id': 1}}, {u'code': 11000, - u'errmsg': u'...E11000 duplicate key error index: bulk_example.test.$_id_ dup key: { : 3 }', + u'errmsg': u'...E11000 duplicate key error...', u'index': 2, u'op': {'_id': 3}}]} diff --git a/doc/tutorial.rst b/doc/tutorial.rst index 7a528f3fb..3ae5fbef3 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -144,8 +144,8 @@ of the collections in our database: .. doctest:: - >>> db.collection_names() - [u'posts', u'system.indexes'] + >>> db.collection_names(include_system_collections=False) + [u'posts'] .. note:: The *system.indexes* collection is a special internal collection that was created automatically. @@ -355,9 +355,8 @@ First, we'll need to create the index: >>> result = db.profiles.create_index([('user_id', pymongo.ASCENDING)], ... unique=True) - >>> [idx['name'] - ... for idx in db.system.indexes.find({'ns': 'test-database.profiles'})] - [u'_id_', u'user_id_1'] + >>> list(db.profiles.index_information()) + [u'user_id_1', u'_id_'] Notice that we have two indexes now: one is the index on ``_id`` that MongoDB creates automatically, and the other is the index on ``user_id`` we just