@@ -32,7 +32,7 @@ Declare and Create an Index
3232~~~~~~~~~~~~~~~~~~~~~~~~~~~
3333
3434When using {+odm+}, you can declare your index using the ``index`` macro and
35- then create it using the ``create_index `` macro.
35+ then create it using the ``create_indexes `` macro.
3636
3737The following code example shows how to declare and create an ascending index
3838named ``cuisine_index`` on the ``cuisine`` field in the ``Restaurant`` class:
@@ -43,13 +43,13 @@ named ``cuisine_index`` on the ``cuisine`` field in the ``Restaurant`` class:
4343 :start-after: start create index
4444 :end-before: end create index
4545
46- The ``index`` macro defines the index you want to create and the ``create_index ``
46+ The ``index`` macro defines the index you want to create and the ``create_indexes ``
4747macro creates the index in the ``restaurants`` collection.
4848
4949When defining an index, the first hash object contains the field you want to
5050index and its direction. ``1`` represents an ascending index, ``-1`` represents a
5151descending index. The second hash object contains index options. To learn more
52- about index options, see the :ref:`mongoid_indexes_api_documentation ` section.
52+ about index options, see the :ref:`mongoid-indexes-api-documentation ` section.
5353
5454Aliases and Declaring Indexes
5555+++++++++++++++++++++++++++++
@@ -156,7 +156,8 @@ Atlas Search Indexes
156156
157157You can declare and manage Atlas Search indexes using {+odm+}.
158158
159- To declare a search index, use the ``search_index`` macro within your model. The
159+ To declare a search index, use the ``search_index`` macro within your model. To
160+ create the declared search indexes, use the ``create_search_indexes`` macro. The
160161following code example shows how to declare and create an Atlas Search index
161162named ``my_search_index``.
162163The index is on the ``name`` and ``cuisine`` fields and is dynamic.
0 commit comments