@@ -12,8 +12,8 @@ Enumerating Indexes
12
12
:Status: Draft
13
13
:Type: Standards
14
14
:Server Versions: 1.8-2.7.5, 2.8.0-rc3 and later
15
- :Last Modified: 2018-04-05
16
- :Version: 0.4.1
15
+ :Last Modified: 2020-01-14
16
+ :Version: 0.5.0
17
17
18
18
.. contents ::
19
19
@@ -279,10 +279,15 @@ subsequent retrieved documents through getmore on the cursor constructed from
279
279
``res.cursor.ns `` and ``res.cursor.id ``), and the query result for
280
280
``system.indexes ``.
281
281
282
- The returned result for each variant MUST be equivalent, and each index
283
- that is returned MUST use the field names ``v ``, ``key ``, ``name `` and ``ns ``.
284
- If the result contains additional fields, they MUST be included verbatim (like
285
- ``2dsphereIndexVersion `` in the example below).
282
+ In MongoDB 4.4, the ``ns `` field was removed from the index specifications returned from the ``listIndexes `` command.
283
+
284
+ - For drivers that report those index specifications in the form of documents or dictionaries, no special handling is
285
+ necessary, but any documentation of the contents of the documents/dictionaries MUST indicate that the ``ns `` field
286
+ will no longer be present in MongoDB 4.4+. If the contents of the documents/dictionaries are undocumented, then no
287
+ special mention of the ``ns `` field is necessary.
288
+ - For drivers that report those index specifications in the form of statically defined models, the driver MUST manually populate
289
+ the ``ns `` field of the models with the appropriate namespace if the server does not report it in the ``listIndexes `` command
290
+ response. The ``ns `` field is not required to be a part of the models, however.
286
291
287
292
Example return (a cursor which returns documents, not a simple array)::
288
293
@@ -353,13 +358,15 @@ Tests
353
358
354
359
- verify that *all * index names are represented in the result
355
360
- verify that there are no duplicate index names
356
- - there are no returned indexes that do not exist
361
+ - verify there are no returned indexes that do not exist
357
362
358
363
- Run the driver's method that returns a list of index information records, and:
359
364
360
- - all the indexes are represented in the result
361
- - the "unique" flags show up for the unique index
362
- - there are no duplicates in the returned list
365
+ - verify all the indexes are represented in the result
366
+ - verify the "unique" flags show up for the unique index
367
+ - verify there are no duplicates in the returned list
368
+ - if the result consists of statically defined index models that include an ``ns `` field, verify
369
+ that its value is accurate
363
370
364
371
365
372
Backwards Compatibility
@@ -379,6 +386,8 @@ The shell implements the first algorithm for falling back if the
379
386
380
387
Version History
381
388
===============
389
+ 0.5.0 - 2020-01-14
390
+ MongoDB 4.4 no longer inclues ``ns `` field in ``listIndexes `` responses.
382
391
383
392
0.4.1 - 2018-04-05
384
393
Fix typo.
0 commit comments