From 4f5b0634ad944534012a7752f26dfbe541160a2c Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Tue, 7 Nov 2017 16:26:01 -0500 Subject: [PATCH] Add documentation for auto_create_index to the Indexing section of the Docs --- docs/guide/defining-documents.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/guide/defining-documents.rst b/docs/guide/defining-documents.rst index d41ae7e6..5ff7a56b 100644 --- a/docs/guide/defining-documents.rst +++ b/docs/guide/defining-documents.rst @@ -526,8 +526,9 @@ There are a few top level defaults for all indexes that can be set:: meta = { 'index_options': {}, 'index_background': True, + 'index_cls': False, + 'auto_create_index': True, 'index_drop_dups': True, - 'index_cls': False } @@ -540,6 +541,12 @@ There are a few top level defaults for all indexes that can be set:: :attr:`index_cls` (Optional) A way to turn off a specific index for _cls. +:attr:`auto_create_index` (Optional) + When this is True (default), MongoEngine will ensure that the correct + indexes exist in MongoDB each time a command is run. This can be disabled + in systems where indexes are managed separately. Disabling this will improve + performance. + :attr:`index_drop_dups` (Optional) Set the default value for if an index should drop duplicates