ankane / searchkick

Intelligent search made easy
MIT License
6.51k stars 754 forks source link

Share indexes across environments? #1674

Closed antarr closed 5 months ago

antarr commented 5 months ago

I have a database that is shared across production and staging. Is it possible to configure searchkick, to use a single index for both staging and production?

ankane commented 5 months ago

Hi @antarr, you can use the same ELASTICSEARCH_URL/OPENSEARCH_URL across environments and either set the index name directly on the model (searchkick index_name: "my-index") or set Searchkick.env so it's the same in both environments (since it's included in the default index name).