Class: ElasticSearch::Thrift::Rest::Client

Inherits:
Object
  • Object
show all
Includes:
Thrift::Client
Defined in:
lib/elasticsearch/transport/thrift/rest.rb

Instance Method Summary collapse

Instance Method Details

#execute(request) ⇒ Object



16
17
18
19
# File 'lib/elasticsearch/transport/thrift/rest.rb', line 16

def execute(request)
  send_execute(request)
  return recv_execute()
end

#recv_executeObject

Raises:

  • (::Thrift::ApplicationException)


25
26
27
28
29
# File 'lib/elasticsearch/transport/thrift/rest.rb', line 25

def recv_execute()
  result = receive_message(Execute_result)
  return result.success unless result.success.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'execute failed: unknown result')
end

#send_execute(request) ⇒ Object



21
22
23
# File 'lib/elasticsearch/transport/thrift/rest.rb', line 21

def send_execute(request)
  send_message('execute', Execute_args, :request => request)
end