ankane / searchkick

Intelligent search made easy
MIT License
6.49k stars 750 forks source link

multiple elasticsearch servers in same rails app #897

Closed shivamagg closed 6 years ago

shivamagg commented 7 years ago

Hey. Is it possible to set up multiple (precisely two) elasticsearch servers in the rails app (config/initializers/elasticsearch.rb) so that the modifications to data are triggered in both the servers?

I want to use multiple servers as they are for different purposes in the micorservices architecture.

ankane commented 7 years ago

Hey @shivamagg, Searchkick doesn't provide a way to do this.

fschwahn commented 7 years ago

@ankane I had a related problem, I access an external database which has it's own elasticsearch-server. I was able to make the elasticsearch client configurable per model with only a few changes. If you are interested I could clean it up and create a PR - then you can decide if this is worthwhile?

ankane commented 6 years ago

Hey @fschwahn, happy to take a look if you want to put a PR together.