Open sr-akhil opened 1 year ago
If it will help anyone
Model.__elasticsearch__.client = Elasticsearch::Client.new(host: 'hostname'). indices.put_alias name: tenant_name, index: 'metastore', body: { routing: tenant_name, filter: { ... } }
index_name {"#{tenant_name}"}
I wanted to now whether it is possible to specify an alias near the index_name in an AR model so that the url the is getting hit can be made dynamic.
I am trying to use this gem for multi-tenant application which is currently using mySQL db with every tenant having his own db. So it would be helpful if any feature as the following is available so that the request URL used for PUT request become dynamic
E.g.
will result in the following request
PUT test/_alias/tenant_name
using which it will be possible to configure required job at the Elasticsearch side
Thanks