Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mcsimps2 opened this issue Apr 7, 2025 · 1 comment · May be fixed by #2879
Open

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

mcsimps2 opened this issue Apr 7, 2025 · 1 comment · May be fixed by #2879

Comments

@mcsimps2
Copy link
Contributor

mcsimps2 commented Apr 7, 2025

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
Copy link
Contributor Author

mcsimps2 commented Apr 7, 2025

I can throw up a quick PR for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant