Open rileytg opened 10 years ago
Currently it is possible to do it like this:
elasticsearch!({
index_name: Rails.env.test? ? 'myapp_model_test' : 'myapp_model',
})
Or:
Mongoid::Elasticsearch.prefix = Rails.env.test? ? 'myapp_test_' : 'myapp_'
Prefixing index names is currently not enabled by default, possibly it would be better to have something like app name+env there.
Perhaps this indicates the need to prefix indicies based on environment