@@ -155,16 +155,17 @@ the ``raw_aggregate()`` method.
155
155
156
156
.. important::
157
157
158
- You cannot use {+django-odm+} to create Atlas Search indexes.
158
+ You cannot use the ``QuerySet`` API to create Atlas Search indexes.
159
+ However, you can create an index by exposing your ``MongoClient``
160
+ object directly, on which you can call the PyMongo driver's
161
+ ``create_search_index()`` method. To learn how to expose the
162
+ ``MongoClient``, see the :ref:`django-client-operations` section
163
+ of this guide.
159
164
160
165
For instructions on using the PyMongo driver to create an Atlas
161
166
Search index, see `Atlas Search and Vector Search Indexes
162
- <https://www.mongodb.com/docs/languages/python/ pymongo-driver/current /indexes/atlas-search-index/>`__
167
+ <{+ pymongo-docs+} /indexes/atlas-search-index/>`__
163
168
in the PyMongo documentation.
164
-
165
- For instructions on alternative methods of creating search indexes,
166
- see :atlas:`Create an Atlas Search Index </atlas-search/tutorial/create-index/>`
167
- in the Atlas documentation.
168
169
169
170
This example runs an Atlas Search query by passing the ``$search`` pipeline
170
171
stage to the ``raw_aggregate()`` method. The code performs the following
@@ -251,16 +252,16 @@ the ``raw_aggregate()`` method:
251
252
252
253
.. important::
253
254
254
- You cannot use {+django-odm+} to create ``2d`` or ``2dsphere`` indexes.
255
+ You cannot use the ``QuerySet`` API to create ``2d`` or ``2dsphere`` indexes.
256
+ However, you can create indexes by exposing your ``MongoClient``
257
+ object directly, on which you can call the PyMongo driver's
258
+ ``create_index()`` method. To learn how to expose the
259
+ ``MongoClient``, see the :ref:`django-client-operations` section
260
+ of this guide.
255
261
256
262
For instructions on using the PyMongo driver to create geospatial
257
- indexes, see `Geospatial Indexes
258
- <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/indexes/geospatial-index/>`__
263
+ indexes, see `Geospatial Indexes <{+pymongo-docs+}/indexes/geospatial-index/>`__
259
264
in the PyMongo documentation.
260
-
261
- For instructions on using the MongoDB Shell to create geospatial
262
- indexes, see :manual:`Geospatial Indexes </core/indexes/index-types/index-geospatial/>`
263
- in the {+mdb-server+} manual.
264
265
265
266
This example runs a geospatial query by passing the ``$match`` and
266
267
``$geoWithin`` pipeline stages to the ``raw_aggregate()`` method. The
0 commit comments