Search template for xpack/graph/explore

Is it possible to make a search template for an xpack graph query? I want to set up an app to populate a query and prefer to create a template if possible.

POST my_index/_xpack/graph/_explore
{
  "query": {
    "match_phrase": {
      "text": "spiderman"
    }
  },
  "controls": {
    "use_significance": true
  },
  "vertices": [
    {
      "field": "movie_name.keyword",
      "size": 5,
      "min_doc_count": 3,
      "shard_min_doc_count": 1
    },
    {
      "field": "actor",
      "size": 5,
      "min_doc_count": 3,
      "shard_min_doc_count": 1
    }
  ],
  "connections": {
    "vertices": [
      {
        "field": "movie_name.keyword",
        "size": 5,
        "min_doc_count": 3,
        "shard_min_doc_count": 1
      },
      {
        "field": "actor",
        "size": 5,
        "min_doc_count": 3,
        "shard_min_doc_count": 1
      }
    ]
}
}

I spoke to someone at Elastic and it is not possible to create a search template for an xpack graph query.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.