Is it possible to set the timeout
property of a Faraday transport when creating a Ruby Elasticsearch::Client
? There is the scope to pass a block when initializing an Elasticsearch::Transport::Transport::Faraday
instance, but when trying the below we only ever get an empty set of connections back from __build_connections
:
transport = Elasticsearch::Transport::Transport::HTTP::Faraday.new do |connection|
# connection.timeout = 1 # ???
end
Any suggestions as to how we should implement this block to set the timeout?
you can run this.
Elasticsearch::Client.new transport_options: {
request: { timeout: 1 }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With