According to the documentation about Atlas Search, it states:
$search must be the first stage of any pipeline it appears in.
Well if that is the case, how do you apply Mongo filters. It seems very counter-intuitive to apply these filters on the output of the search?
We are thinking about using Mongodb full text search as an alternative to Algolia, but this limitation seems weird
Current pipeline:
const pipeline = [
{
$search: {
text: {
query,
path: fields,
fuzzy: {
maxEdits: 1,
maxExpansions: 50,
},
},
},
},
{
$match: {
someField: 1,
},
},
];