From b53f114dbd2aaea710f7362d882434aa328dc22a Mon Sep 17 00:00:00 2001 From: Lindsey Moore Date: Thu, 19 Dec 2024 20:57:50 -0500 Subject: [PATCH 01/10] DOCSP-45206 Atlas Search Indexes --- source/indexes.txt | 2 +- source/indexes/atlas-search-index.txt | 30 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 source/indexes/atlas-search-index.txt diff --git a/source/indexes.txt b/source/indexes.txt index 454bb8fd..03ede0ca 100644 --- a/source/indexes.txt +++ b/source/indexes.txt @@ -23,9 +23,9 @@ Optimize Queries by Using Indexes :maxdepth: 1 Single Field + Atlas Search .. Compound .. Multikey -.. Atlas Search Overview -------- diff --git a/source/indexes/atlas-search-index.txt b/source/indexes/atlas-search-index.txt new file mode 100644 index 00000000..4999f4d8 --- /dev/null +++ b/source/indexes/atlas-search-index.txt @@ -0,0 +1,30 @@ +.. _ruby-atlas-search-index: + +==================== +Atlas Search Indexes +==================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: index, query, optimization, efficiency + +Overview +-------- + +:atlas:`Atlas Search ` enables you to perform full-text searches on +collections hosted on MongoDB Atlas. Atlas Search indexes specify the behavior of +the search and which fields to index. + +You can call the following database commands to manage you Atlas Search indexes: + +- createSearchIndexes +- \ No newline at end of file From e2c05c71ddf7a657ab37d9abda066dc4e55daf01 Mon Sep 17 00:00:00 2001 From: Lindsey Moore Date: Thu, 19 Dec 2024 22:35:06 -0500 Subject: [PATCH 02/10] first draft --- source/includes/indexes/atlas-search-index.rb | 55 ++++++++++++ source/indexes/atlas-search-index.txt | 88 ++++++++++++++++++- 2 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 source/includes/indexes/atlas-search-index.rb diff --git a/source/includes/indexes/atlas-search-index.rb b/source/includes/indexes/atlas-search-index.rb new file mode 100644 index 00000000..12d322e2 --- /dev/null +++ b/source/includes/indexes/atlas-search-index.rb @@ -0,0 +1,55 @@ +require 'mongo' + +# Replace the placeholders with your credentials +uri = "" + +# Sets the server_api field of the options object to Stable API version 1 +options = { server_api: { version: "1" }} + +# Creates a new client and connect to the server +client = Mongo::Client.new(uri, options) + +database = client.use('sample_mflix') +collection = database[:movies] + +# start-create-search-index +index_definition = { + name: '', + definition: { + mappings: { + dynamic: false, + fields: { + : {type: ''}, + : {type: ''} + } + } + } +} +collection.database.command( + createSearchIndexes: '', + indexes: [index_definition] +) +# end-create-search-index + +# start-update-search-indexes +updated_definition = { + mappings: { + dynamic: false, + fields: { : { type: '' } } + } +} +collection.database.command( + updateSearchIndex: '', + name: '', + definition: updated_definition +) +# end-update-search-indexes + +# start-drop-search-index +collection.database.command( + dropSearchIndex: '', + name: '' +) +# end-drop-search-index + +client.close \ No newline at end of file diff --git a/source/indexes/atlas-search-index.txt b/source/indexes/atlas-search-index.txt index 4999f4d8..0d102209 100644 --- a/source/indexes/atlas-search-index.txt +++ b/source/indexes/atlas-search-index.txt @@ -27,4 +27,90 @@ the search and which fields to index. You can call the following database commands to manage you Atlas Search indexes: - createSearchIndexes -- \ No newline at end of file +- dropSearchIndex +- updateSearchIndex + +The following sections provide code examples that demonstrate how to use +each of the preceding methods. + +.. _ruby-atlas-search-index-create: + +Create a Search Index +--------------------- + +You can use the ``createSearchIndexes`` database command to create one or +more Atlas Search indexes. + +The following code example shows how to create multiple Atlas Search indexes: + +.. literalinclude:: /includes/indexes/atlas-search-index.rb + :language: ruby + :start-after: start-create-search-index + :end-before: end-create-search-index + :dedent: + +To learn more about the syntax for the ``createSearchIndex`` database command, +see the :manual:`createSearchIndexes ` +reference in the {+mdb-server+} manual. + +To learn more about the syntax for the index ``definition``, see the +:atlas:`Review Atlas Search Index Syntax ` +guide in the Atlas manual. + +.. note:: Atlas Vector Search Indexes + + You can also use this method to create Atlas Vector Search Indexes. + Atlas Vector Search enables you to perform semantic searches on vector + embeddings stored in MongoDB Atlas. To learn more about this feature, + see the :atlas:`Atlas Vector Search Overview + `. + +Update a Search Index +--------------------- + +You can use the ``updateSearchIndex`` database command to update an Atlas Search index. + +To update the index, you must provide a new index ``definition``. The +following code shows how to update the search index: + +.. literalinclude:: /includes/indexes/atlas-search-index.rb + :language: ruby + :start-after: start-update-search-indexes + :end-before: end-update-search-indexes + :dedent: + +To learn more about the syntax for the ``updateSearchIndex`` database command, +see the :manual:`updateSearchIndex ` +reference in the {+mdb-server+} manual. + +Delete a Search Index +--------------------- + +You can use the ``dropSearchIndex`` database command to delete an Atlas Search index. + +To delete the index, you must provide the ``name`` of the index. The following +code shows how to delete a search index from a collection: + +.. literalinclude:: /includes/indexes/atlas-search-index.rb + :language: ruby + :start-after: start-drop-search-index + :end-before: end-drop-search-index + :dedent: + +To learn more about the syntax for the ``dropSearchIndex`` database command, +see the :manual:`dropSearchIndex ` +reference in the {+mdb-server+} manual. + +Additional Information +---------------------- + +To learn more about MongoDB Atlas Search, see the +:atlas:`Atlas Search ` documentation. + +API Documentation +~~~~~~~~~~~~~~~~~ + +To learn more about the {+driver-short+} methods used in this guide, see the following API documentation: + +- `database <{+api-root+}/Mongo/Collection.html#database-instance_method>`__ +- `command <{+api-root+}/Mongo/Database.html#command-instance_method>`__ From d67320862c9c8c8ad11f5a2d6064369eca48f1d0 Mon Sep 17 00:00:00 2001 From: Lindsey Moore Date: Thu, 19 Dec 2024 22:35:46 -0500 Subject: [PATCH 03/10] draft code --- source/includes/indexes/atlas-search-index.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/includes/indexes/atlas-search-index.rb b/source/includes/indexes/atlas-search-index.rb index 12d322e2..1641b33a 100644 --- a/source/includes/indexes/atlas-search-index.rb +++ b/source/includes/indexes/atlas-search-index.rb @@ -51,5 +51,3 @@ name: '' ) # end-drop-search-index - -client.close \ No newline at end of file From 609d67699997a5b45cfebb0c6721145452747204 Mon Sep 17 00:00:00 2001 From: Lindsey Moore Date: Thu, 19 Dec 2024 22:49:12 -0500 Subject: [PATCH 04/10] edits --- source/indexes/atlas-search-index.txt | 31 ++++++++++++--------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/source/indexes/atlas-search-index.txt b/source/indexes/atlas-search-index.txt index 0d102209..88cdb7a5 100644 --- a/source/indexes/atlas-search-index.txt +++ b/source/indexes/atlas-search-index.txt @@ -21,17 +21,17 @@ Overview -------- :atlas:`Atlas Search ` enables you to perform full-text searches on -collections hosted on MongoDB Atlas. Atlas Search indexes specify the behavior of -the search and which fields to index. +collections hosted on MongoDB Atlas. With Atlas Search indexes, you can specify the +behavior of the search and which fields to index. You can call the following database commands to manage you Atlas Search indexes: -- createSearchIndexes -- dropSearchIndex -- updateSearchIndex +- ``createSearchIndexes`` +- ``dropSearchIndex`` +- ``updateSearchIndex`` The following sections provide code examples that demonstrate how to use -each of the preceding methods. +each of the preceding commands. .. _ruby-atlas-search-index-create: @@ -47,9 +47,8 @@ The following code example shows how to create multiple Atlas Search indexes: :language: ruby :start-after: start-create-search-index :end-before: end-create-search-index - :dedent: -To learn more about the syntax for the ``createSearchIndex`` database command, +To learn more about the syntax for the ``createSearchIndexes`` database command, see the :manual:`createSearchIndexes ` reference in the {+mdb-server+} manual. @@ -59,10 +58,10 @@ guide in the Atlas manual. .. note:: Atlas Vector Search Indexes - You can also use this method to create Atlas Vector Search Indexes. - Atlas Vector Search enables you to perform semantic searches on vector - embeddings stored in MongoDB Atlas. To learn more about this feature, - see the :atlas:`Atlas Vector Search Overview + You can also use the ``createSearchIndexes`` database command to create + Atlas Vector Search Indexes. Atlas Vector Search enables you to perform + semantic searches on vector embeddings stored in MongoDB Atlas. To learn + more about this feature, see the :atlas:`Atlas Vector Search Overview `. Update a Search Index @@ -70,14 +69,13 @@ Update a Search Index You can use the ``updateSearchIndex`` database command to update an Atlas Search index. -To update the index, you must provide a new index ``definition``. The -following code shows how to update the search index: +To update an index, you must provide a new index ``definition``. The +following code shows how to update a search index: .. literalinclude:: /includes/indexes/atlas-search-index.rb :language: ruby :start-after: start-update-search-indexes :end-before: end-update-search-indexes - :dedent: To learn more about the syntax for the ``updateSearchIndex`` database command, see the :manual:`updateSearchIndex ` @@ -88,14 +86,13 @@ Delete a Search Index You can use the ``dropSearchIndex`` database command to delete an Atlas Search index. -To delete the index, you must provide the ``name`` of the index. The following +To delete an index, you must provide the ``name`` of the index. The following code shows how to delete a search index from a collection: .. literalinclude:: /includes/indexes/atlas-search-index.rb :language: ruby :start-after: start-drop-search-index :end-before: end-drop-search-index - :dedent: To learn more about the syntax for the ``dropSearchIndex`` database command, see the :manual:`dropSearchIndex ` From 3bd5c038f3401b93b3ad57655085163ef99e04f5 Mon Sep 17 00:00:00 2001 From: Lindsey Moore Date: Thu, 9 Jan 2025 20:49:43 -0500 Subject: [PATCH 05/10] using native api --- source/includes/indexes/atlas-search-index.rb | 80 ++++++++++++++----- source/indexes/atlas-search-index.txt | 62 +++++++++----- 2 files changed, 104 insertions(+), 38 deletions(-) diff --git a/source/includes/indexes/atlas-search-index.rb b/source/includes/indexes/atlas-search-index.rb index 1641b33a..71113b19 100644 --- a/source/includes/indexes/atlas-search-index.rb +++ b/source/includes/indexes/atlas-search-index.rb @@ -13,23 +13,51 @@ collection = database[:movies] # start-create-search-index -index_definition = { - name: '', +# Creates indexes on all dynamically indexable fields with a default index name +collection.search_indexes.create_one( + { mappings: { dynamic: true } } +) + +# Creates an index on the specified field with the specified index name +index-definition = { + mappings: { + dynamic: false, + fields: { + : {type: ''} + } + } +} +collection.search_indexes.create_one(index_definition, name: '') + +# end-create-search-index + +# start-create-multiple-search-indexes +index_spec_1 = { + name: '', definition: { mappings: { dynamic: false, fields: { - : {type: ''}, - : {type: ''} + : {type: ''} } } } } -collection.database.command( - createSearchIndexes: '', - indexes: [index_definition] -) -# end-create-search-index + +index_spec_2 = { + name: '', + definition: { + mappings: { + dynamic: false, + fields: { + : {type: ''} + } + } + } +} + +collection.search_indexes.create_many([index_spec_1, index_spec_2]) +# end-create-multiple-search-indexes # start-update-search-indexes updated_definition = { @@ -38,16 +66,32 @@ fields: { : { type: '' } } } } -collection.database.command( - updateSearchIndex: '', - name: '', - definition: updated_definition -) + +# Specifies the index to update by using the index name +collection.search_indexes.update_one(updated_definition, name: '') + +# Specifies the index to update by using the index id +collection.search_indexes.update_one(updated_definition, id: ) # end-update-search-indexes # start-drop-search-index -collection.database.command( - dropSearchIndex: '', - name: '' -) +# Specifies the index to delete by using the index name +collection.search_indexes.drop_one(name: '') + +# Specifies the index to delete by using the index id +collection.search_indexes.drop_one(id: ) # end-drop-search-index + +# start-list-entire-spec +puts collection.search_indexes.collect(&:to_json) +# end-list-entire-spec + +# start-list-certain-elements +collection.search_indexes.each do |index_spec| + p index_spec['id'] + p index_spec['name'] + p index_spec['status'] + p index_spec['queryable'] + p index_spec['latestDefinition'] +end +# end-list-certain-elements diff --git a/source/indexes/atlas-search-index.txt b/source/indexes/atlas-search-index.txt index 88cdb7a5..3343bbc4 100644 --- a/source/indexes/atlas-search-index.txt +++ b/source/indexes/atlas-search-index.txt @@ -25,7 +25,7 @@ collections hosted on MongoDB Atlas. With Atlas Search indexes, you can specify behavior of the search and which fields to index. You can call the following database commands to manage you Atlas Search indexes: - +.. revise - ``createSearchIndexes`` - ``dropSearchIndex`` - ``updateSearchIndex`` @@ -38,21 +38,30 @@ each of the preceding commands. Create a Search Index --------------------- -You can use the ``createSearchIndexes`` database command to create one or -more Atlas Search indexes. +To create one or more Atlas Search indexes, use the ``search_indexes#create_one`` +or the ``search_indexes#create_many`` methods. The methods will return immediately, +while the indexes are asynchronously created in the background. -The following code example shows how to create multiple Atlas Search indexes: +The following code example shows how to create an Atlas Search index by passing +an index definition and an optional name for the index: .. literalinclude:: /includes/indexes/atlas-search-index.rb :language: ruby :start-after: start-create-search-index :end-before: end-create-search-index -To learn more about the syntax for the ``createSearchIndexes`` database command, -see the :manual:`createSearchIndexes ` -reference in the {+mdb-server+} manual. +You can use ``search_indexes#create_many`` to create multiple Atlas Search indexes by +passing an array of index specifications. Each index specification should include an index key, +which defines the index, and a name key to specify the index name. The following +code example shows how to create multiple search indexes: + +.. literalinclude:: /includes/indexes/atlas-search-index.rb + :language: ruby + :start-after: start-create-multiple-search-indexes + :end-before: end-create-multiple-search-indexes -To learn more about the syntax for the index ``definition``, see the +For longer index definitions, it is helpful to define the index definitions outside +of the method call. To learn more about the syntax of index definitions, see the :atlas:`Review Atlas Search Index Syntax ` guide in the Atlas manual. @@ -67,26 +76,23 @@ guide in the Atlas manual. Update a Search Index --------------------- -You can use the ``updateSearchIndex`` database command to update an Atlas Search index. +To update an Atlas Search index, use the ``search_indexes#update_one`` method. -To update an index, you must provide a new index ``definition``. The -following code shows how to update a search index: +To update an index, you must provide a new index definition. You must specify +the index you want to update by using either the``name`` or ``id`` of the index. +The following code shows how to update a search index: .. literalinclude:: /includes/indexes/atlas-search-index.rb :language: ruby :start-after: start-update-search-indexes :end-before: end-update-search-indexes -To learn more about the syntax for the ``updateSearchIndex`` database command, -see the :manual:`updateSearchIndex ` -reference in the {+mdb-server+} manual. - Delete a Search Index --------------------- -You can use the ``dropSearchIndex`` database command to delete an Atlas Search index. +To delete an Atlas Search index, use the ``search_indexes#drop_one`` method. -To delete an index, you must provide the ``name`` of the index. The following +To delete an index, you must provide the ``id`` or ``name`` of the index. The following code shows how to delete a search index from a collection: .. literalinclude:: /includes/indexes/atlas-search-index.rb @@ -98,6 +104,25 @@ To learn more about the syntax for the ``dropSearchIndex`` database command, see the :manual:`dropSearchIndex ` reference in the {+mdb-server+} manual. +List Search Indexes +------------------- + +You can use the ``search_indexes`` object to list the entire index specification +of each index: + +.. literalinclude:: /includes/indexes/atlas-search-index.rb + :language: ruby + :start-after: start-list-entire-spec + :end-before: end-list-entire-spec + +To list individual fields in the index specification for each index, iterate +over the ``search_indexes`` object: + +.. literalinclude:: /includes/indexes/atlas-search-index.rb + :language: ruby + :start-after: start-list-certain-elements + :end-before: end-list-certain-elements + Additional Information ---------------------- @@ -108,6 +133,3 @@ API Documentation ~~~~~~~~~~~~~~~~~ To learn more about the {+driver-short+} methods used in this guide, see the following API documentation: - -- `database <{+api-root+}/Mongo/Collection.html#database-instance_method>`__ -- `command <{+api-root+}/Mongo/Database.html#command-instance_method>`__ From f6fbe31a15b2696e8604d047f622a7032346d6e1 Mon Sep 17 00:00:00 2001 From: Lindsey Moore Date: Fri, 10 Jan 2025 13:22:18 -0500 Subject: [PATCH 06/10] edits --- source/includes/indexes/atlas-search-index.rb | 3 +- source/indexes/atlas-search-index.txt | 33 +++++++------------ 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/source/includes/indexes/atlas-search-index.rb b/source/includes/indexes/atlas-search-index.rb index 71113b19..7dad1461 100644 --- a/source/includes/indexes/atlas-search-index.rb +++ b/source/includes/indexes/atlas-search-index.rb @@ -28,7 +28,6 @@ } } collection.search_indexes.create_one(index_definition, name: '') - # end-create-search-index # start-create-multiple-search-indexes @@ -63,7 +62,7 @@ updated_definition = { mappings: { dynamic: false, - fields: { : { type: '' } } + fields: { : { type: '' } } } } diff --git a/source/indexes/atlas-search-index.txt b/source/indexes/atlas-search-index.txt index 3343bbc4..f8e28e57 100644 --- a/source/indexes/atlas-search-index.txt +++ b/source/indexes/atlas-search-index.txt @@ -24,11 +24,12 @@ Overview collections hosted on MongoDB Atlas. With Atlas Search indexes, you can specify the behavior of the search and which fields to index. -You can call the following database commands to manage you Atlas Search indexes: -.. revise -- ``createSearchIndexes`` -- ``dropSearchIndex`` -- ``updateSearchIndex`` +You can call the following methods to manage you Atlas Search indexes: + +- ``search_indexes#create_one`` +- ``search_indexes#create_many`` +- ``search_indexes#update_one`` +- ``search_indexes#drop_one`` The following sections provide code examples that demonstrate how to use each of the preceding commands. @@ -42,7 +43,7 @@ To create one or more Atlas Search indexes, use the ``search_indexes#create_one` or the ``search_indexes#create_many`` methods. The methods will return immediately, while the indexes are asynchronously created in the background. -The following code example shows how to create an Atlas Search index by passing +The following code example shows how to create an Atlas Search index by providing an index definition and an optional name for the index: .. literalinclude:: /includes/indexes/atlas-search-index.rb @@ -51,8 +52,8 @@ an index definition and an optional name for the index: :end-before: end-create-search-index You can use ``search_indexes#create_many`` to create multiple Atlas Search indexes by -passing an array of index specifications. Each index specification should include an index key, -which defines the index, and a name key to specify the index name. The following +providing an array of index specifications. Each index specification should include a definition +key, which defines the index, and a name key to specify the index name. The following code example shows how to create multiple search indexes: .. literalinclude:: /includes/indexes/atlas-search-index.rb @@ -65,14 +66,6 @@ of the method call. To learn more about the syntax of index definitions, see the :atlas:`Review Atlas Search Index Syntax ` guide in the Atlas manual. -.. note:: Atlas Vector Search Indexes - - You can also use the ``createSearchIndexes`` database command to create - Atlas Vector Search Indexes. Atlas Vector Search enables you to perform - semantic searches on vector embeddings stored in MongoDB Atlas. To learn - more about this feature, see the :atlas:`Atlas Vector Search Overview - `. - Update a Search Index --------------------- @@ -100,10 +93,6 @@ code shows how to delete a search index from a collection: :start-after: start-drop-search-index :end-before: end-drop-search-index -To learn more about the syntax for the ``dropSearchIndex`` database command, -see the :manual:`dropSearchIndex ` -reference in the {+mdb-server+} manual. - List Search Indexes ------------------- @@ -132,4 +121,6 @@ To learn more about MongoDB Atlas Search, see the API Documentation ~~~~~~~~~~~~~~~~~ -To learn more about the {+driver-short+} methods used in this guide, see the following API documentation: +To learn more about the {+driver-short+} methods used in this guide, see the +following API documentation: + From 1062c4d5e8b5483887b20ebebd666546d7e65375 Mon Sep 17 00:00:00 2001 From: Lindsey Moore Date: Fri, 10 Jan 2025 13:57:13 -0500 Subject: [PATCH 07/10] emphasize lines --- source/indexes/atlas-search-index.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/indexes/atlas-search-index.txt b/source/indexes/atlas-search-index.txt index f8e28e57..ea972b5f 100644 --- a/source/indexes/atlas-search-index.txt +++ b/source/indexes/atlas-search-index.txt @@ -40,7 +40,7 @@ Create a Search Index --------------------- To create one or more Atlas Search indexes, use the ``search_indexes#create_one`` -or the ``search_indexes#create_many`` methods. The methods will return immediately, +or the ``search_indexes#create_many`` method. Both methods return immediately, while the indexes are asynchronously created in the background. The following code example shows how to create an Atlas Search index by providing @@ -50,6 +50,7 @@ an index definition and an optional name for the index: :language: ruby :start-after: start-create-search-index :end-before: end-create-search-index + :emphasize-lines: 15 You can use ``search_indexes#create_many`` to create multiple Atlas Search indexes by providing an array of index specifications. Each index specification should include a definition @@ -60,6 +61,7 @@ code example shows how to create multiple search indexes: :language: ruby :start-after: start-create-multiple-search-indexes :end-before: end-create-multiple-search-indexes + :emphasize-lines: 25 For longer index definitions, it is helpful to define the index definitions outside of the method call. To learn more about the syntax of index definitions, see the @@ -123,4 +125,3 @@ API Documentation To learn more about the {+driver-short+} methods used in this guide, see the following API documentation: - From e90c84b318a1788e89718c07d9c8dcf3b36bd4d3 Mon Sep 17 00:00:00 2001 From: Lindsey Moore Date: Mon, 13 Jan 2025 15:17:17 -0500 Subject: [PATCH 08/10] RM typo --- source/indexes/atlas-search-index.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/indexes/atlas-search-index.txt b/source/indexes/atlas-search-index.txt index ea972b5f..f84f9560 100644 --- a/source/indexes/atlas-search-index.txt +++ b/source/indexes/atlas-search-index.txt @@ -74,7 +74,7 @@ Update a Search Index To update an Atlas Search index, use the ``search_indexes#update_one`` method. To update an index, you must provide a new index definition. You must specify -the index you want to update by using either the``name`` or ``id`` of the index. +the index you want to update by using either the ``name`` or ``id`` of the index. The following code shows how to update a search index: .. literalinclude:: /includes/indexes/atlas-search-index.rb From a2ca15208453cd4b877f3bbbde550a8000692a66 Mon Sep 17 00:00:00 2001 From: Lindsey Moore Date: Thu, 16 Jan 2025 10:29:06 -0500 Subject: [PATCH 09/10] var rename --- source/includes/indexes/atlas-search-index.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/includes/indexes/atlas-search-index.rb b/source/includes/indexes/atlas-search-index.rb index 7dad1461..7123020e 100644 --- a/source/includes/indexes/atlas-search-index.rb +++ b/source/includes/indexes/atlas-search-index.rb @@ -19,7 +19,7 @@ ) # Creates an index on the specified field with the specified index name -index-definition = { +index_definition = { mappings: { dynamic: false, fields: { From 53041ef5543dd786e6893f6f9b068a8f770e2025 Mon Sep 17 00:00:00 2001 From: Lindsey Moore Date: Thu, 16 Jan 2025 10:34:39 -0500 Subject: [PATCH 10/10] code spacing --- source/includes/indexes/atlas-search-index.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/includes/indexes/atlas-search-index.rb b/source/includes/indexes/atlas-search-index.rb index 7123020e..cbbb2f89 100644 --- a/source/includes/indexes/atlas-search-index.rb +++ b/source/includes/indexes/atlas-search-index.rb @@ -23,7 +23,7 @@ mappings: { dynamic: false, fields: { - : {type: ''} + : { type: '' } } } } @@ -37,7 +37,7 @@ mappings: { dynamic: false, fields: { - : {type: ''} + : { type: '' } } } } @@ -49,7 +49,7 @@ mappings: { dynamic: false, fields: { - : {type: ''} + : { type: '' } } } }