# Graph Explore

class elasticsearch.client.GraphClient

  To use this client, access `client.graph` from an `Elasticsearch` client. For example:

      from elasticsearch import Elasticsearch

      # Create the client instance
      client = Elasticsearch(...)
      # Use the graph client
      client.graph.<method>(...)

  explore(*, index, connections=None, controls=None, error_trace=None, filter_path=None, human=None, pretty=None, query=None, routing=None, timeout=None, vertices=None, body=None)

    Explore graph analytics.

    Extract and summarize information about the documents and terms in an Elasticsearch data stream or index. The easiest way to understand the behavior of this API is to use the Graph UI to explore connections. An initial request to the `_explore` API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph. Subsequent requests enable you to spider out from one more vertices of interest. You can exclude vertices that have already been returned.

    https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-graph

    Parameters:

      - index (str | Sequence[str]) – Name of the index.

      - connections (Mapping[str, Any] | None) – Specifies or more fields from which you want to extract terms that are associated with the specified vertices.

      - controls (Mapping[str, Any] | None) – Direct the Graph API how to build the graph.

      - query (Mapping[str, Any] | None) – A seed query that identifies the documents of interest. Can be any valid Elasticsearch query.

      - routing (str | Sequence[str] | None) – Custom value used to route operations to a specific shard.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Specifies the period of time to wait for a response from each shard. If no response is received before the timeout expires, the request fails and returns an error. Defaults to no timeout.

      - vertices (Sequence[Mapping[str, Any]] | None) – Specifies one or more fields that contain the terms you want to include in the graph as vertices.

      - error_trace (bool | None)

      - filter_path (str | Sequence[str] | None)

      - human (bool | None)

      - pretty (bool | None)

      - body (Dict[str, Any] | None)

    Return type:

      ObjectApiResponse[Any]