PHPLIB-1735 Implement returnStoredSource in $vectorSearch#1896
Conversation
There was a problem hiding this comment.
Pull request overview
Implements support for the returnStoredSource option on the $vectorSearch aggregation stage within the PHP builder, aligning stage construction and encoding with the updated spec and adding coverage for the new option.
Changes:
- Added
returnStoredSourceas an optional boolean argument/property for$vectorSearchstage encoding. - Updated the stage factory and fluent factory helpers to accept/pass through
returnStoredSource. - Added a new pipeline fixture and test case validating
returnStoredSource: trueoutput.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Builder/Stage/VectorSearchStageTest.php | Adds a new test covering $vectorSearch with returnStoredSource: true. |
| tests/Builder/Stage/Pipelines.php | Updates vector search doc links and adds a stored-source pipeline fixture. |
| src/Builder/Stage/VectorSearchStage.php | Extends the stage operator to include and serialize returnStoredSource. |
| src/Builder/Stage/FluentFactoryTrait.php | Adds returnStoredSource to the fluent vectorSearch() helper and forwards it. |
| src/Builder/Stage/FactoryTrait.php | Adds returnStoredSource to the static vectorSearch() factory and forwards it. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v2.x #1896 +/- ##
=========================================
Coverage 87.72% 87.72%
Complexity 3328 3328
=========================================
Files 454 454
Lines 6656 6657 +1
=========================================
+ Hits 5839 5840 +1
Misses 817 817
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
returnStoredSource in $vectorSearchreturnStoredSource in $vectorSearch
returnStoredSource in $vectorSearchreturnStoredSource in $vectorSearch
Depends on mongodb/mql-specifications#38
Fixes PHPLIB-1735