Class: ElasticSearch::Transport::HTTP
- Defined in:
- lib/elasticsearch/transport/http.rb
Constant Summary collapse
- DEFAULTS =
{ :timeout => 5 }.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #connect! ⇒ Object
-
#initialize(server, options = {}) ⇒ HTTP
constructor
A new instance of HTTP.
Methods inherited from Base
Methods included from BaseProtocol
Methods included from ClusterAdminProtocol
#cluster_health, #cluster_state, #nodes_info, #nodes_stats, #restart_nodes, #shutdown_nodes
Methods included from IndexAdminProtocol
#alias_index, #create_index, #delete_index, #flush, #index_status, #optimize, #refresh, #snapshot, #update_mapping
Methods included from IndexProtocol
#count, #delete, #get, #index, #scroll, #search
Constructor Details
Instance Method Details
#connect! ⇒ Object
17 18 19 20 21 22 |
# File 'lib/elasticsearch/transport/http.rb', line 17 def connect! @session = Patron::Session.new @session.base_url = @server @session.timeout = @options[:timeout] @session.headers['User-Agent'] = 'ElasticSearch.rb v0.1' end |