You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm trying to implement the Pagy pagination gem with Chewy, but Chewy automatically includes kaminari and/or will_paginate if they are included in the project, and this built-in pagination is used behind-the-scenes automatically. The solution I've tried with some success is to make sure no other pagination gems are included, and then use Pagy with Chewy via:
The specific issue is that pagination gems like will_paginate are automatically included and forced to be used if they are in the project, meaning I cannot switch from will_paginate to Pagy or another pagination alternative piece-by-piece, but must instead do an all-or-nothing approach.
Describe the solution you'd like
It would be nice to have an initializer for Chewy that sets the pagination gem to be used explicitly, and use none if none is provided. The reason I want to use Pagy is because it has a smaller memory footprint on pagination, and if you have a site that does a lot of Elasticsearch searches, decreasing the memory footprint a little bit pays off a lot in the long run.
Describe alternatives you've considered
Pagy works with elasticsearch-rails itself, but I like using Chewy because you add a lot of value and features! So getting rid of Chewy is a no-go for my team.
I have a solution that "seems" to work (listed above), but I'm not sure if it's the best implementation for trying to add Pagy pagination to Chewy. I was hoping there would have been a more plugin-style approach to pagination instead of using only kaminari or will_paginate.
I'm also looking at trying to reverse engineer those pagination modules that are listed in the Chewy pagination code, but I have to track down what calls belong to Chewy and which belong to the pagination gems themselves to see how I would implement something similar for Pagy.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I'm trying to implement the Pagy pagination gem with Chewy, but Chewy automatically includes
kaminari
and/orwill_paginate
if they are included in the project, and this built-in pagination is used behind-the-scenes automatically. The solution I've tried with some success is to make sure no other pagination gems are included, and then use Pagy with Chewy via:The specific issue is that pagination gems like
will_paginate
are automatically included and forced to be used if they are in the project, meaning I cannot switch fromwill_paginate
to Pagy or another pagination alternative piece-by-piece, but must instead do an all-or-nothing approach.Describe the solution you'd like
It would be nice to have an initializer for Chewy that sets the pagination gem to be used explicitly, and use none if none is provided. The reason I want to use Pagy is because it has a smaller memory footprint on pagination, and if you have a site that does a lot of Elasticsearch searches, decreasing the memory footprint a little bit pays off a lot in the long run.
Describe alternatives you've considered
Pagy works with
elasticsearch-rails
itself, but I like using Chewy because you add a lot of value and features! So getting rid of Chewy is a no-go for my team.I have a solution that "seems" to work (listed above), but I'm not sure if it's the best implementation for trying to add Pagy pagination to Chewy. I was hoping there would have been a more plugin-style approach to pagination instead of using only
kaminari
orwill_paginate
.I'm also looking at trying to reverse engineer those pagination modules that are listed in the Chewy pagination code, but I have to track down what calls belong to Chewy and which belong to the pagination gems themselves to see how I would implement something similar for Pagy.
The text was updated successfully, but these errors were encountered: