Skip to content

Commit 3f0ed04

Browse files
committed
Remove chained method Stage::search() as the $search stage must be first
1 parent 0102816 commit 3f0ed04

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/Aggregation/Stage.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -343,21 +343,6 @@ public function sample(int $size): Stage\Sample
343343
return $this->builder->sample($size);
344344
}
345345

346-
/**
347-
* The $search stage performs a full-text search on the specified field or
348-
* fields which must be covered by an Atlas Search index.
349-
*
350-
* @deprecated Since doctrine/mongodb-odm 2.13. This $search stage must be the first of the pipeline, use Builder::search() instead.
351-
*
352-
* @see https://www.mongodb.com/docs/atlas/atlas-search/query-syntax/#mongodb-pipeline-pipe.-search
353-
*/
354-
public function search(): Stage\Search
355-
{
356-
trigger_deprecation('doctrine/mongodb-odm', '2.13', 'Using "%s" is deprecated because the $search stage must be the first of the pipeline, use "%s::search()" instead.', __METHOD__, Builder::class);
357-
358-
return $this->builder->search();
359-
}
360-
361346
/**
362347
* Adds new fields to documents. $set outputs documents that contain all
363348
* existing fields from the input documents and newly added fields.

0 commit comments

Comments
 (0)