DOCSP-45398-detail-large-number-queries#742
DOCSP-45398-detail-large-number-queries#742sarah-olson-mongodb merged 9 commits intomongodb:masterfrom
Conversation
✅ Deploy Preview for docs-compass ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
jason-price-mongodb
left a comment
There was a problem hiding this comment.
@shuangela lgtm with suggestions. Cheers.
| wrap the integer in string characters. | ||
|
|
||
| For example, to find all documents with a ``number`` value of ``507550989629521900``, use | ||
| the following query filter: |
There was a problem hiding this comment.
"this query filter:"
| To query for integers larger than the JavaScript maximum integer size, | ||
| wrap the integer in string characters. | ||
|
|
||
| For example, to find all documents with a ``number`` value of ``507550989629521900``, use | ||
| this query filter: | ||
|
|
||
| .. code-block:: javascript | ||
|
|
||
| { "number": "507550989629521900" } No newline at end of file |
There was a problem hiding this comment.
This example doesn't actually work. It's important to mention the need for NumberLong in the example. This is how Compass knows the type to search for. In the example given in the current draft, Compass would interpret the search value as a string, not as a Long (aka large integer).
For example, { restaurant_id: NumberLong(507550989629521900) } would not work, but { restaurant_id: NumberLong("507550989629521900") } would work
There was a problem hiding this comment.
Ah, thanks for the clarification! I'll change the example
DESCRIPTION
Add information on how to query for large numbers in compass
STAGING
https://deploy-preview-742--docs-compass.netlify.app/query/filter/
JIRA
https://jira.mongodb.org/browse/DOCSP-45398
BUILD LOG
https://app.netlify.com/sites/docs-compass/deploys/67f6e76bf4da2d0008cd45e3
Self-Review Checklist
External Review Requirements
What's expected of an external reviewer?