-
Notifications
You must be signed in to change notification settings - Fork 7
DOCSP-46322: Raw queries #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for docs-django ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Added my new suggestions. Let me know what you think. The prose may need some workshopping, though.
- :ref:`django-raw-queries-filter-group` | ||
- :ref:`django-raw-queries-search` | ||
- :ref:`django-raw-queries-geospatial` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final addition. Let's add a section here for Exposing the MongoClient
. The language is in case someone wants to execute a query completely absent of the Django framework. The way to do that is like this:
from django.db import connections
client = connections["<DATABASES_KEY>"].database.client
This gives the underlying MongoClient Django references when making queries. With this exposed, users have access to MongoDB's full library of functions such as command()
, find()
, create_index()
, create_search_index()
and much, much more!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like useful information but I think it's outside the scope of this page - since I orient everything around the raw_aggregate() method, using aggregation pipelines, and I introduce the page that way, I would have to spend some time reworking. Do you think this is necessary for public preview or can I ticket it out for later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say we should still push to add this information in somewhere, but it doesn't need to be in raw queries. I figured it would be best for the raw querying section. It doesn't have to be here, but we can discuss if there's another ongoing/yet-to-be-made section where it's sensible to push.
source/interact-data/raw-queries.txt
Outdated
For instructions on using the PyMongo driver to create an Atlas | ||
Search index, see `Atlas Search and Vector Search Indexes | ||
<https://www.mongodb.com/docs/languages/python/pymongo-driver/current/indexes/atlas-search-index/>`__ | ||
in the PyMongo documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As well, add here that you can retrieve the MongoClient
object by following the information (I've supplied just now in another comment) and then follow these instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
JIRA - https://jira.mongodb.org/browse/DOCSP-46322
Staging - https://deploy-preview-1--docs-django.netlify.app/interact-data/raw-queries/
Old PR (got writing approval, Jib and Alex approved) - mongodb/docs-pymongo#143