Skip to content

Feature request: Add environment name to index name #5

@pfeiffer

Description

@pfeiffer

At the moment the default index name and the custom index name are the same in all environments. This causes updates triggered in eg. test mode to update data/indexes in the other environment as well.

A suggestion could be to add a suffix to the index name, like this:

@index_name = [options[:index_name] || self.table_name.underscore, RAILS_ENV || Rails.env].join("_")

Causing a User-model to use an index name of "users_production" in production environment and "users_test" in test environment.

Let me know what you think and I can provide a patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions