Skip to content

Respect paginate.max even without paginate.default #2104

@umamialex

Description

@umamialex

Ran into a situation today where I have to stop using paginate.default.

Long story short, I'm using feathers-mongodb and the Model.countDocuments call used by pagination isn't using my index for whatever reason and is killing my DB. I don't need the total on every query, so I removed paginate.default.

However, paginate.max is now not being respected:
https://github.com/feathersjs/databases/blob/master/packages/adapter-commons/src/filter-query.ts#L14-L23

I'm thinking that max should still be respected with or without default being set?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions