-
Notifications
You must be signed in to change notification settings - Fork 24
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
not working with mongoDb cluster 7 #60
Comments
Same here |
I've fixed this @Bamorem - the documentation has this:
So if you just change this to |
I have also set the Can someone please advise? I'm not sure what I'm doing wrong. Here is my pipeline: const pipeline = [
{
$search: {
index: 'title',
text: {
query: 'xxxxxxx',
path: {
wildcard: '*',
},
},
},
},
{
$match: {
status: 'active',
tags: {
$in: ['tag1', 'tag2'],
},
},
},
]; FYI, the above pipeline works with "mongoose-aggregate-paginate-v2": |
@erksdee I found the solution to this to be passing in your aggregate as the countQuery in the paginationOptions. While debugging the issue I noticed once we set So where before we had this: const aggregation = this.aggregateModel.aggregate(
stages,
{ session: session },
);
return await this.aggregateModel.aggregatePaginate(aggregation, paginationOptions); where paginationOptions contained const aggregation = this.aggregateModel.aggregate(
stages,
{ session: session },
);
return await this.aggregateModel.aggregatePaginate(
aggregation,
{
...paginationOptions,
countQuery: aggregation,
},
); The issue appears to be here. |
@MattLicense Would be nice if you can do a PR. |
…r of documents. Fixes issues where `useFacet` cannot be true (e.g. use of `$search` in a pipeline) returning only a single page of results as seen aravindnc#60
After upgrating my cluster 6 to 7
my aggregatePaginate() doesn't woke using $geoNear.
It was working under a cluster 6, but not 7.
And the same aggregate is working with a simple aggregate() without paginate using geoNear.
The text was updated successfully, but these errors were encountered: