We can read into the elasticsearch-ruby CHANGELOG (Vewsion 7.7.0) That we have New API Endpoints availables. Transforms included. Here they are.
We are using elasticsearch-ruby 7.15.0. But don't know how to use it.
Here is my example...
require 'elasticsearch'
elasticsearch = Elasticsearch::Client.new(
cloud_id: '******',
user: '******',
password: '******',
log: false
)
elasticsearch.transform.stop_transform transform_id: 'my_transform'
But we get an error...
/usr/local/rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/elasticsearch-7.15.0/lib/elasticsearch.rb:43:in `method_missing': undefined method `transform' for #<Elasticsearch::Client:0x0000556a2ad72bb8> (NoMethodError)
The code it's inside the folder /lib/elasticsearch/api/actions. Just as indices.
We can use indices like that...
if elasticsearch.indices.exists? index: 'mi_index'
<do what ever we want>
end
We can't find nothing into de doc. https://rubydoc.info/gems/elasticsearch-api/Elasticsearch/API
So, how can we use the transform endopints?