Skip to content

Commit da4cd3b

Browse files
committed
fixes
1 parent 3f75ae0 commit da4cd3b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

source/reference/indexes.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Declare and Create an Index
3232
~~~~~~~~~~~~~~~~~~~~~~~~~~~
3333

3434
When 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

3737
The following code example shows how to declare and create an ascending index
3838
named ``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``
4747
macro creates the index in the ``restaurants`` collection.
4848

4949
When defining an index, the first hash object contains the field you want to
5050
index and its direction. ``1`` represents an ascending index, ``-1`` represents a
5151
descending 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

5454
Aliases and Declaring Indexes
5555
+++++++++++++++++++++++++++++
@@ -156,7 +156,8 @@ Atlas Search Indexes
156156

157157
You 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
160161
following code example shows how to declare and create an Atlas Search index
161162
named ``my_search_index``.
162163
The index is on the ``name`` and ``cuisine`` fields and is dynamic.

0 commit comments

Comments
 (0)