Skip to content

Commit ecf23fe

Browse files
committed
edits
1 parent d83672a commit ecf23fe

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

source/includes/model-data/indexes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ class Meta:
6565
class Meta:
6666
db_table = "recipes"
6767
indexes = [
68-
SearchIndex(fields=["title"],
69-
name="title_search_idx"),
68+
SearchIndex(
69+
fields=["title"],
70+
name="title_search_idx",
71+
)
7072
]
7173
# end-atlas-search
7274

source/model-data/indexes.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,16 @@ index types:
211211
Atlas Search Indexes
212212
~~~~~~~~~~~~~~~~~~~~
213213

214-
Atlas Search indexes specify the behavior of an Atlas Search, or a full-text
215-
search on collections hosted on MongoDB Atlas.
214+
Atlas Search indexes specify the behavior of an Atlas Search, which is a
215+
full-text search on collections hosted on MongoDB Atlas.
216216

217217
To create an Atlas Search index, assign the ``indexes`` option in your model's
218218
``Meta`` class to a ``SearchIndex`` object. Pass the following arguments to the
219219
``SearchIndex()`` constructor:
220220

221221
- ``fields``: The fields you want to index.
222222
- ``name``: *(Optional)* The name of your Atlas Search index. If you do not
223-
specify this argument, {+django-odm+} automatically generates an index name.
223+
specify this argument, {+framework+} automatically generates an index name.
224224

225225
The following example updates the ``Recipe`` model's ``Meta`` class to create
226226
an Atlas Search index named ``"title_search_idx"`` on the ``title`` field:
@@ -234,8 +234,11 @@ an Atlas Search index named ``"title_search_idx"`` on the ``title`` field:
234234

235235
.. tip::
236236

237-
To learn more about Atlas Search queries and indexes, see :atlas:`Atlas Search </atlas-search>`
238-
in the Atlas documentation.
237+
To learn more about Atlas Search queries and indexes, see the following resources:
238+
239+
- :atlas:`Atlas Search </atlas-search>` in the Atlas documentation.
240+
- `SearchIndex <{+api+}ref/models/indexes/#searchindex>`__ class in the
241+
{+django-odm+} API documentation.
239242

240243
.. _django-indexes-partial:
241244

0 commit comments

Comments
 (0)