Class: Eson::HTTP::Client

Inherits:
Client
  • Object
show all
Defined in:
lib/eson/http/client.rb

Overview

This client is a convenience subclass of Client. It sets sane default parameters and adds the following plugins: StatusHandler for handling response status, ResponseParser to parse JSON responses and return Hashes and QueryPlugin to use the Query DSL directly.

Constant Summary collapse

DEFAULT_OPTS =

Default settings

{
  :server => "http://localhost:9200",
  :protocol => Eson::HTTP
}

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Client

Returns a new instance of Client.

See Also:

  • Client


16
17
18
19
# File 'lib/eson/http/client.rb', line 16

def initialize(opts = {})
  opts = DEFAULT_OPTS.merge(:plugins => default_plugins).merge(opts)
  super(opts)
end