Skip to content

DOCS-6106: document indexOptionDefaults #2455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions source/includes/apiargs-dbcommand-create-field.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
...
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ description: |
validation rules or expressions. You can specify the expressions using
the same operators as the :ref:`query operators <query-selectors>`
with the exception of :query:`$geoNear`, :query:`$near`,
:query:`$nearSphere`, :query:`$text`, ahd :query:`$where`.
:query:`$nearSphere`, :query:`$text`, and :query:`$where`.

.. note::

Expand Down Expand Up @@ -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-name>: <options> }

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
...
3 changes: 2 additions & 1 deletion source/reference/command/create.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ Definition
storageEngine: <document>,
validator: <document>,
validationLevel: <string>,
validationAction: <string>
validationAction: <string>,
indexOptionDefaults: <document>
}

:dbcommand:`create` has the following fields:
Expand Down
3 changes: 2 additions & 1 deletion source/reference/method/db.createCollection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ Definition
storageEngine: <document>,
validator: <document>,
validationLevel: <string>,
validationAction: <string> } )
validationAction: <string>,
indexOptionDefaults: <document> } )

The :method:`db.createCollection()` method has the following parameters:

Expand Down