File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ the failure.
109109 'upserted': [],
110110 'writeConcernErrors': [],
111111 'writeErrors': [{u'code': 11000,
112- u'errmsg': u'...E11000 duplicate key error index: bulk_example.test.$_id_ dup key: { : 4 } ',
112+ u'errmsg': u'...E11000 duplicate key error... ',
113113 u'index': 1,
114114 u'op': {'_id': 4}}]}
115115
@@ -146,11 +146,11 @@ and fourth operations succeed.
146146 'upserted': [],
147147 'writeConcernErrors': [],
148148 'writeErrors': [{u'code': 11000,
149- u'errmsg': u'...E11000 duplicate key error index: bulk_example.test.$_id_ dup key: { : 1 } ',
149+ u'errmsg': u'...E11000 duplicate key error... ',
150150 u'index': 0,
151151 u'op': {'_id': 1}},
152152 {u'code': 11000,
153- u'errmsg': u'...E11000 duplicate key error index: bulk_example.test.$_id_ dup key: { : 3 } ',
153+ u'errmsg': u'...E11000 duplicate key error... ',
154154 u'index': 2,
155155 u'op': {'_id': 3}}]}
156156
Original file line number Diff line number Diff line change @@ -351,8 +351,8 @@ First, we'll need to create the index:
351351
352352 >>> result = db.profiles.create_index([(' user_id' , pymongo.ASCENDING )],
353353 ... unique= True )
354- >>> [idx[ ' name ' ] for idx in db.profiles.list_indexes()]
355- [u'_id_ ', u'user_id_1 ']
354+ >>> list ( db.profiles.index_information())
355+ [u'user_id_1 ', u'_id_ ']
356356
357357Notice that we have two indexes now: one is the index on ``_id `` that MongoDB
358358creates automatically, and the other is the index on ``user_id `` we just
You can’t perform that action at this time.
0 commit comments