图探索(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)

探索图分析功能。 提取并总结Elasticsearch数据流或索引中文档和术语的信息。 理解此API行为的最简单方法是使用Graph UI来探索连接关系。 首次向_explore API发出的请求包含一个种子查询,用于标识目标文档并指定定义图中顶点和连接的字段。 后续请求允许您从一个或多个关注顶点向外扩展探索。 您可以排除已经返回过的顶点。

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

Parameters:
  • index (str | Sequence[str]) – 索引名称。

  • connections (Mapping[str, Any] | None) – 指定一个或多个字段,从中提取与指定顶点相关联的术语。

  • controls (Mapping[str, Any] | None) – 指导Graph API如何构建图。

  • query (Mapping[str, Any] | None) – 标识目标文档的种子查询。可以是任何有效的Elasticsearch查询。

  • routing (str | None) – 用于将操作路由到特定分片的自定义值。

  • timeout (str | Literal[-1] | ~typing.Literal[0] | None) – 指定等待每个分片响应的超时时间。如果在超时前未收到响应,请求将失败并返回错误。默认为无超时。

  • vertices (Sequence[Mapping[str, Any]] | None) – 指定包含要作为顶点纳入图中的术语的一个或多个字段。

  • 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]