[DOCS-11175] Document how to project (aggregation) day/month/year from an ISODate field using the Java driver Created: 08/Jan/18 Updated: 27/Jan/21 Resolved: 27/Jan/21 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | drivers |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Angela Morgan (Inactive) | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Participants: | |||||
| Days since reply: | 3 years, 2 weeks, 1 day ago | ||||
| Description |
|
Please document how to project day/month/year from an ISODate field using the Java driver. The customer attached to this docs ticket had difficulty figuring out how to do this and so did I For example:
Thanks, |
| Comments |
| Comment by Nathan Leniz [ 27/Jan/21 ] | |||
|
Closing this issue as duplicate, a section on common expressions will be included when covering Aggregates builders in the new driver docs | |||
| Comment by Angela Morgan (Inactive) [ 09/Jan/18 ] | |||
|
Created a list of commonly used aggregation pipeline operators here DOCSP-1607. Also, if we go with Shannons tab suggestion, maybe consider an additional tab containing the SQL equivalent (if one exists). | |||
| Comment by Angela Morgan (Inactive) [ 09/Jan/18 ] | |||
|
shannon.bradshaw, Yes, I believe that is correct. The customer tried the following syntax to begin with:
then they opened a support ticket when it didn't work. ricardo.lorenzo pointed me to this link https://groups.google.com/forum/#!msg/mongodb-user/AqZrp1ZhQMY/X3xxkOU0EAAJ with an example of how to use Document.parse() to create a projection object. It helped me create a working example for the customer:
I think the tab layout you are suggesting will be convenient and easy to use. My only concern is the customer might not associate the Server>Reference>Operators>Aggregation Pipeline Operators doc with driver examples and fail to find what they are looking for. But if the search works then it probably won't be a problem. I spoke with jeff.yemin and Kay Kim about this yesterday afternoon on the Java slack channel. Kay said they are planning on providing centralized driver examples in the manual for aggregation, index creation, and running commands. The specific agg examples, they haven't settled on. The timing of this will be sooner rather than later – but will have a more concrete idea of the timing once he returns from vacation. I'm going to open a DOCSP ticket with commonly used aggregation pipeline operators. I'm thinking about getting some input from John Page with the consulting team as well. | |||
| Comment by Shannon Bradshaw (Inactive) [ 08/Jan/18 ] | |||
|
angela.morgan, from MMSSUPPORT-18282 it looks like the customer's point of confusion was not knowing how to create an object representing the projection they wanted to do using the Java driver (e.g., use Document.parse()). Is that your interpretation? If so, do you believe it would address the concern if on reference pages such as: cc: jeff.yemin |