ruby on rails - Multiple Elasticsearch Indexes -


I have a staging & amp; The production example of using a Rail 3 application (using a tire gem) on the same Ubuntu server appears that in both of these instances the same elastic finder is distributing the index, which I obviously do not want to do.

How do I get my production and staging examples to use different instances?

You must override the index name. Suppose that you are working in ActiveRecord, it will make an index name based on the model in question. You can adjust the name with such a prefix;

  class articles & lt; ActiveRecord :: Tire :: Model :: Search includes tires in the :: Model :: Callback index_profix "# {Rails.env}" ... ...   

then the The named index will create development_write , product_development etc. It is important that index_prefix comes after joining the tire.

Alternatively, rename the index entirely

  class articles & lt; ActiveRecord :: Base includes tires :: Model :: Search Tire :: Model :: Callback index_name "My-development-paragraph-index" ...    

Comments