From f4fefa6b18b6ffb28725ac714df9e700a4919930 Mon Sep 17 00:00:00 2001 From: Kyle Suarez Date: Tue, 8 Dec 2015 14:37:51 -0500 Subject: [PATCH] DOCS-6106 document indexOptionDefaults This adds documentation for the `indexOptionDefaults` option for the `create` command and its shell helper, `db.createCommand()`. --- .../apiargs-dbcommand-create-field.yaml | 9 ++++++ ...hod-db.createCollection-options-param.yaml | 28 ++++++++++++++++++- source/reference/command/create.txt | 3 +- .../reference/method/db.createCollection.txt | 3 +- 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/source/includes/apiargs-dbcommand-create-field.yaml b/source/includes/apiargs-dbcommand-create-field.yaml index 03cb3560b42..6c95b2e46c8 100644 --- a/source/includes/apiargs-dbcommand-create-field.yaml +++ b/source/includes/apiargs-dbcommand-create-field.yaml @@ -110,4 +110,13 @@ arg_name: field interface: dbcommand operation: create position: 10 +--- +name: indexOptionDefaults +source: + file: apiargs-method-db.createCollection-options-param.yaml + ref: indexOptionDefaults +arg_name: field +interface: dbcommand +operation: create +position: 11 ... diff --git a/source/includes/apiargs-method-db.createCollection-options-param.yaml b/source/includes/apiargs-method-db.createCollection-options-param.yaml index 3b26bfd039c..802fee5b7f4 100644 --- a/source/includes/apiargs-method-db.createCollection-options-param.yaml +++ b/source/includes/apiargs-method-db.createCollection-options-param.yaml @@ -138,7 +138,7 @@ description: | validation rules or expressions. You can specify the expressions using the same operators as the :ref:`query operators ` with the exception of :query:`$geoNear`, :query:`$near`, - :query:`$nearSphere`, :query:`$text`, ahd :query:`$where`. + :query:`$nearSphere`, :query:`$text`, and :query:`$where`. .. note:: @@ -193,4 +193,30 @@ operation: db.createCollection optional: true position: 10 type: string +--- +name: indexOptionDefaults +arg_name: field +description: | + Allows users to specify a default configuration for indexes when + creating a collection. + + The ``indexOptionDefaults`` option accepts a ``storageEngine`` + document, which should take the following form: + + .. code-block:: javascript + + { : } + + Storage engine configuration specified when creating indexes are + validated and logged to the :term:`oplog` during replication to + support replica sets with members that use different storage + engines. + + .. versionadded:: 3.2 + +interface: method +operation: db.createCollection +optional: true +position: 11 +type: document ... diff --git a/source/reference/command/create.txt b/source/reference/command/create.txt index 92c82d458b9..7b6a45d620e 100644 --- a/source/reference/command/create.txt +++ b/source/reference/command/create.txt @@ -26,7 +26,8 @@ Definition storageEngine: , validator: , validationLevel: , - validationAction: + validationAction: , + indexOptionDefaults: } :dbcommand:`create` has the following fields: diff --git a/source/reference/method/db.createCollection.txt b/source/reference/method/db.createCollection.txt index 041ce5cadae..b4992aa8450 100644 --- a/source/reference/method/db.createCollection.txt +++ b/source/reference/method/db.createCollection.txt @@ -32,7 +32,8 @@ Definition storageEngine: , validator: , validationLevel: , - validationAction: } ) + validationAction: , + indexOptionDefaults: } ) The :method:`db.createCollection()` method has the following parameters: