chewy icon indicating copy to clipboard operation
chewy copied to clipboard

Use ENV variable to name index by default

Open loqimean opened this issue 10 months ago • 1 comments

Is your feature request related to a problem? Please describe.

I'm always frustrated when I run the tests and my DEV index is reset (because I need real ElasticSearch index testing). So, I solved it after ~2 years by setting name pattern in an initializer. There is too many devs who has this problem and don't know about solution, especially when it's a dev who started using ES and just development.

Describe the solution you'd like

Would be fine to provide built-in patter of naming indexes that use something like this:

Chewy.settings = { prefix: Rails.env }

Describe alternatives you've considered

nothing

Additional context

nothing

loqimean avatar Apr 16 '24 08:04 loqimean

I gues would be fine to do that not only for rails. If it is relevant, I can open a PR to solve it

loqimean avatar Apr 16 '24 08:04 loqimean