chewy
chewy copied to clipboard
Use ENV variable to name index by default
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
I gues would be fine to do that not only for rails. If it is relevant, I can open a PR to solve it