-
Notifications
You must be signed in to change notification settings - Fork 11
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
DOCSP-43074: Specify a Query #30
DOCSP-43074: Specify a Query #30
Conversation
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.
the content looks good but inquiring about the sample data used. I can take another look once you respond and/or make adjustments!
source/read/specify-a-query.txt
Outdated
You can refine the set of documents that a query returns by creating a | ||
**query filter**. A query filter is an expression that specifies the search |
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.
You can refine the set of documents that a query returns by creating a | |
**query filter**. A query filter is an expression that specifies the search | |
You can define a **query filter** to retrieve specific documents from a collection | |
when performing a query. A query filter is an expression that specifies the search |
source/read/specify-a-query.txt
Outdated
In a query filter, you can prompt the driver to search for documents with an | ||
exact match to your query, or you can compose query filters to express more | ||
complex matching criteria. |
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.
In a query filter, you can prompt the driver to search for documents with an | |
exact match to your query, or you can compose query filters to express more | |
complex matching criteria. | |
By defining a query filter, you can direct the driver to search for documents with an | |
exact match to your query, or you can compose query filters to express more | |
complex matching criteria. |
source/read/specify-a-query.txt
Outdated
Sample Data | ||
~~~~~~~~~~~ | ||
|
||
The examples in this guide run operations on a collection called | ||
``fruits`` that contains the following documents: | ||
|
||
.. code-block:: json | ||
|
||
{ "_id": 1, "name": "apples", "quantity": 5, "rating": 3, "color": "red", "type": ["fuji", "honeycrisp"] }, | ||
{ "_id": 2, "name": "bananas", "quantity": 7, "rating": 4, "color": "yellow", "type": ["cavendish"] }, | ||
{ "_id": 3, "name": "oranges", "quantity": 6, "rating": 2, "type": ["naval", "mandarin"] }, | ||
{ "_id": 4, "name": "pineapple", "quantity": 3, "rating": 5, "color": "yellow" }, | ||
|
||
The following code example shows how to create a database and collection, then | ||
insert the sample documents into your collection: | ||
|
||
.. literalinclude:: /includes/read/specify-a-query.c | ||
:start-after: start-sample-data | ||
:end-before: end-sample-data | ||
:language: c | ||
:dedent: | ||
:copyable: |
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.
Q: Should we follow convention used in other pages/standardizations to use the Atlas sample data when possible instead of using generated data?
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.
Can change to the restaurants collection.
EDIT: will use movies instead
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.
a few small improvements, but approving! Can take another look if needed.
source/read/distinct.txt
Outdated
.. TODO | ||
.. For more information about | ||
.. creating a query filter, see :ref:`c-specify-query`. | ||
For more information about creating a query filter, see :ref:`c-specify-query`. |
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.
For more information about creating a query filter, see :ref:`c-specify-query`. | |
To learn more about creating query filters, see :ref:`c-specify-query`. |
.. output:: | ||
:visible: false | ||
|
||
{ "_id" : { "$oid" : "..." }, "title" : "Wild and Woolly", "type" : "movie", ... } |
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.
S: can truncate these results further
{ "_id" : { "$oid" : "..." }, "title" : "Wild and Woolly", "type" : "movie", ... } | |
{ "_id" : ..., "title" : "Wild and Woolly", "type" : "movie", ... } |
source/read/specify-a-query.txt
Outdated
parameter to the ``mongoc_collection_find_with_opts()`` function. The code returns all documents with a | ||
``year`` field value greater than ``2015``. |
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.
parameter to the ``mongoc_collection_find_with_opts()`` function. The code returns all documents with a | |
``year`` field value greater than ``2015``. | |
parameter to the ``mongoc_collection_find_with_opts()`` function. The code returns all documents in which | |
the value of the ``year`` field is greater than ``2015``. |
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.
Use this phrasing where applicable
source/read/specify-a-query.txt
Outdated
To learn more about retrieving documents with the {+driver-short+}, see | ||
:ref:`c-retrieve`. |
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.
S: avoid "with"
To learn more about retrieving documents with the {+driver-short+}, see | |
:ref:`c-retrieve`. | |
To learn more about using the driver to retrieve documents, see | |
:ref:`c-retrieve`. |
✅ Deploy Preview for docs-c ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-43074
Staging - https://preview-mongodbmcmorisi.gatsbyjs.io/c/DOCSP-43074-specify-query/read/specify-a-query/
Self-Review Checklist