# Search template for xpack/graph/explore

**URL:** <https://discuss.elastic.co/t/search-template-for-xpack-graph-explore/173258>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-graph\
**Created:** [March 21, 2019, 7:37am UTC](https://discuss.elastic.co/t/search-template-for-xpack-graph-explore/173258 "2019-03-21T07:37:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![1fmusic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/1fmusic/32/37903_2.png) [@1fmusic](https://discuss.elastic.co/u/1fmusic)\
**Post date:** [March 21, 2019, 7:37am UTC](https://discuss.elastic.co/t/search-template-for-xpack-graph-explore/173258/1 "2019-03-21T07:37:29Z")

</div>

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
      }
    ]
}
}
```

---

<div class="post-metadata">

**Author:** ![1fmusic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/1fmusic/32/37903_2.png) [@1fmusic](https://discuss.elastic.co/u/1fmusic)\
**Post date:** [April 5, 2019, 2:40am UTC](https://discuss.elastic.co/t/search-template-for-xpack-graph-explore/173258/2 "2019-04-05T02:40:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 3, 2019, 2:41am UTC](https://discuss.elastic.co/t/search-template-for-xpack-graph-explore/173258/3 "2019-05-03T02:41:18Z")

</div>

Closed on May 3, 2019, 2:41am UTC

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