mongoengine icon indicating copy to clipboard operation
mongoengine copied to clipboard

$search must appear as the first stage in an aggregation pipeline

Open mcsimps2 opened this issue 7 months ago • 1 comments

For users using the $search or $vectorSearch operator in aggregation pipelines for MongoDB Atlas, it must be done in the first stage of the pipeline. This is similar to how $geoNear and $collStats work, which was resolved in #2493.

See the MongoDB docs on $search here.

See the MongoDB docs on $vectorSearch here.

Relevant: #2667, #2785

mcsimps2 avatar Apr 07 '25 17:04 mcsimps2

I can throw up a quick PR for this

mcsimps2 avatar Apr 07 '25 17:04 mcsimps2