aravindnc / mongoose-aggregate-paginate-v2

A cursor based custom aggregate pagination library for Mongoose with customizable labels.
MIT License
131 stars 23 forks source link

fix: non-facet aggregations use correct countQuery to get total numbe… #62

Closed MattLicense closed 1 month ago

MattLicense commented 1 month ago

…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 #60

MattLicense commented 1 month ago

Seeing after pushing that my linter is apparently a little more aggressive on styling so let me know if you want me to tidy that up @aravindnc

aravindnc commented 1 month ago

@MattLicense No worries. But can you take a look why the build fails.

MattLicense commented 1 month ago

That should be it sorted now @aravindnc - sorry about that, forgot that countPipeline was coming as an array, not an actual query.

aravindnc commented 1 month ago

@MattLicense Seems the test case is failing again.