-
Notifications
You must be signed in to change notification settings - Fork 80
DOCSP-45398-detail-large-number-queries #742
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-45398-detail-large-number-queries #742
Conversation
✅ Deploy Preview for docs-compass 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.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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" } |
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?