Skip to content

Commit d9c324b

Browse files
committed
more mongoclient
1 parent 147c936 commit d9c324b

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

snooty.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ api = "https://django-mongodb.readthedocs.io/en/latest/"
1515
mdb-server = "MongoDB Server"
1616
django-version = "5.0"
1717
django-docs = "https://docs.djangoproject.com/en/{+django-version+}"
18-
pymongo-docs = "https://www.mongodb.com/docs/languages/python/pymongo-driver/current/"
18+
pymongo-docs = "https://www.mongodb.com/docs/languages/python/pymongo-driver/current"

source/interact-data/raw-queries.txt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,17 @@ the ``raw_aggregate()`` method.
155155

156156
.. important::
157157

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.
159164

160165
For instructions on using the PyMongo driver to create an Atlas
161166
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/>`__
163168
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.
168169

169170
This example runs an Atlas Search query by passing the ``$search`` pipeline
170171
stage to the ``raw_aggregate()`` method. The code performs the following
@@ -251,16 +252,16 @@ the ``raw_aggregate()`` method:
251252

252253
.. important::
253254

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.
255261

256262
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/>`__
259264
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.
264265

265266
This example runs a geospatial query by passing the ``$match`` and
266267
``$geoWithin`` pipeline stages to the ``raw_aggregate()`` method. The

0 commit comments

Comments
 (0)