Php linked list Mongodb query?

db.categoryGoods.aggregate ([{$match: {categoryId:2841}

)
                        ,{$lookup:{from:"goods",localField:"goodsId",foreignField:"_id",as:"goods"}}
                        ,{$project:{_id:0,goods:1}}
                        ,{$unwind:"$goods"}
                        ,{$match:{"goods.volume":{$lte:100}}}
                        ,{$sort:{"goods.volume":-1,"goods._id":1}}
                        ,{$skip:2}
                        ,{$limit:5}
                       ])
                       

I spent the whole day yesterday, but it didn"t come out. Is there a php mongodb god to help translate the above mongodb command into the execution syntax of php?

Php
Sep.02,2021

$sortMap = [
            ['position'  => 1, 'goods._id' => 1],
            ['goods.volume'  => -1, 'goods._id' => 1],
            ['goods.payPrice'  => -1, 'goods._id' => 1],
            ['goods.payPrice'  => 1, 'goods._id' => 1],
            ['goods.commissionRate'  => -1, 'goods._id' => 1],
            ['goods.createTime'  => -1, 'goods._id' => 1],
        ];
        if ($activeId <= 0 || !in_array($sortType, array_keys($sortMap))) {
            return $res;
        }
        $mongo = MongodbService::getInstance();
        $sort = $sortMap[$sortType];
        $offset = ($page -1) * $pageSize;
        $pipe = [
            ['$match'    => ['activeId' => intval($activeId)]],
            ['$lookup'   => ['from'  => 'goods', 'localField'=> 'goodsId', 'foreignField'=>'_id', 'as'=>'goods']],
            ['$project'  => ['_id'   => 0, 'goods' => 1, 'position' => 1]],
            ['$unwind'   => '$goods'],
            ['$sort'     => $sort],
            ['$skip'     => $offset],
            ['$limit'    => intval($pageSize)]
        ];
        $info = $mongo->selectDatabase('shopping')->selectCollection('activeGoods')->aggregate($pipe);
        foreach ($info as $value) {
            array_push($res['list'], $this->formatGoodsList($value["goods"]));
        }

mongodb linked list query mongodb-$lookup

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaa37b-1fc0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaa37b-1fc0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?