Module: Elasticsearch::XPack::API::Graph::Actions

Included in:
GraphClient
Defined in:
lib/elasticsearch/xpack/api/namespace/graph.rb,
lib/elasticsearch/xpack/api/actions/graph/explore.rb

Instance Method Summary collapse

Instance Method Details

#explore(arguments = {}) ⇒ Object

Get structured information about the vertices and connections in a dataset

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    A comma-separated list of index names to search; use ‘_all` or empty string to perform the operation on all indices

  • :type (List)

    A comma-separated list of document types to search; leave empty to perform the operation on all types

  • :body (Hash)

    The Graph Query DSL definition

  • :routing (String)

    Specific routing value

  • :timeout (Time)

    Explicit operation timeout

See Also:



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/elasticsearch/xpack/api/actions/graph/explore.rb', line 19

def explore(arguments={})
  valid_params = [
    :routing,
    :timeout ]

  arguments = arguments.clone
  index = arguments.delete(:index)
  type  = arguments.delete(:type)

  method = Elasticsearch::API::HTTP_GET
  path   = Elasticsearch::API::Utils.__pathify Elasticsearch::API::Utils.__listify(index), Elasticsearch::API::Utils.__listify(type), '_xpack/_graph/_explore'
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = arguments[:body]

  perform_request(method, path, params, body).body
end