[DOCS-10388] Comment on: "docs-php-library/tutorial/collation.txt" Created: 14/Jun/17  Updated: 27/Oct/23  Resolved: 14/Aug/20

Status: Closed
Project: Documentation
Component/s: drivers
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: christos papidas Assignee: Jeremy Mikola
Resolution: Works as Designed Votes: 0
Labels: collector-298ba4e7, docs-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: https://docs.mongodb.com/php-library/master/tutorial/collation/#find-with-sort
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Screen Resolution: 1920 x 1080


Issue Links:
Related
related to PHPLIB-577 Ensure each API method has at least o... Closed
Participants:
Days since reply: 3 years, 25 weeks, 5 days ago

 Description   

Please add a more described description in aggregation. Check the following example.

return $this->posts->aggregate(
            [
                [
                    '$lookup' => [
                        'from' => 'authors',
                        'localField' => 'author_id',
                        'foreignField' => '_id',
                        'as' => 'author',
                    ],
                ],
                ['$limit' => 5],
                ['$skip' => 0],
                ['$sort' => ['created_at' => -1]]
 
            ],
            [
 
            ]
)->toArray();



 Comments   
Comment by Jeremy Mikola [ 14/Aug/20 ]

I'm not sure what the user is referring to. With respect to the Collation tutorial, there's already an example of aggregate(). The code suggestion in the OP has nothing to do with collation, so perhaps they were referring to the Collection::aggregate() page, which has no example.

I opened PHPLIB-577 as a tracking ticket to ensure that each API method in our docs gets at least one code example, so I propose you close this issue.

Comment by Christopher Cho [ 14/Aug/20 ]

jmikola

Can you take a look and determine whether this is still an issue? Thanks!

Generated at Thu Feb 08 08:00:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.