Open Alaarafeh opened 2 years ago
@Alaarafeh would you be interested in submitting a PR adding missing stages and tests for them?
@malarzm i could give try i have already patch in my project and works for me , i will try to create PR but i don't know what version policy you have as PR (should i create new branch from current version as bug/feature) ? and which kind of tests you used (unit, integration or functional)?
should i create new branch from current version as bug/feature
Your contribution will be a feature in 2.5. Please target 2.4.x branch for now however, I'll take care of branching 2.5.x off once I'm done with bringing back CI to life.
which kind of tests you used
Functional test is not needed, we're mostly interested whether the stage produces correct query after usage. Something like https://github.com/doctrine/mongodb-odm/blob/2.4.x/tests/Doctrine/ODM/MongoDB/Tests/Aggregation/Stage/LookupTest.php or https://github.com/doctrine/mongodb-odm/blob/2.4.x/tests/Doctrine/ODM/MongoDB/Tests/Aggregation/Stage/CountTest.php :)
@Alaarafeh 2.5.x
was just created, please start your work from there whenever you have a chance :)
There is 2 sides for this feature:
$search
operators to the aggregation stages$search
stage to the aggregation builder, along with almost all operators that the stage supports.Defining Atlas Search index currently isn't possible through the driver, but only through the UI. The documentation will contain information on how to set up these indexes, but there is a project at MongoDB to expose search index creation to the drivers. I have no further information on the timeline of that yet.
Doctrine\ODM\MongoDB\Aggregation\Stage we have all possible aggregation stages excapt two Stages:
Useful links: https://www.mongodb.com/docs/atlas/atlas-search/query-syntax/