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

Included in:
GraphClient
Defined in:
lib/elasticsearch/xpack/api/namespace/graph.rb,
lib/elasticsearch/xpack/api/namespace/data_frame.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:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/elasticsearch/xpack/api/actions/graph/explore.rb', line 36

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), '_graph/explore'
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = arguments[:body]

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