Extracts and summarizes information about the documents and terms in an Elasticsearch data stream or index
Path parameters
-
Name of the index.
Body
-
connections object
Additional properties are allowed.
-
controls object
Additional properties are allowed.
-
query object
Additional properties are allowed.
-
vertices array[object]
Specifies one or more fields that contain the terms you want to include in the graph as vertices.
GET /{index}/_graph/explore
curl \
-X GET http://api.example.com/{index}/_graph/explore \
-H "Content-Type: application/json" \
-d '"{\n \"query\": {\n \"match\": {\n \"query.raw\": \"midi\"\n }\n },\n \"vertices\": [\n {\n \"field\": \"product\"\n }\n ],\n \"connections\": {\n \"vertices\": [\n {\n \"field\": \"query.raw\"\n }\n ]\n }\n}"'
Request example
{
"query": {
"match": {
"query.raw": "midi"
}
},
"vertices": [
{
"field": "product"
}
],
"connections": {
"vertices": [
{
"field": "query.raw"
}
]
}
}
Response examples (200)
{
"connections": [
{
"doc_count": 42.0,
"source": 42.0,
"target": 42.0,
"weight": 42.0
}
],
"failures": [
{
"index": "string",
"node": "string",
"reason": {
"type": "string",
"reason": "string",
"stack_trace": "string",
"caused_by": {},
"root_cause": [
{}
],
"suppressed": [
{}
]
},
"shard": 42.0,
"status": "string"
}
],
"timed_out": true,
"took": 42.0,
"vertices": [
{
"depth": 42.0,
"field": "string",
"term": "string",
"weight": 42.0
}
]
}