# Graph: user defined edges

**URL:** <https://discuss.elastic.co/t/graph-user-defined-edges/90672>\
**Category:** Elasticsearch\
**Created:** [June 23, 2017, 4:32pm UTC](https://discuss.elastic.co/t/graph-user-defined-edges/90672 "2017-06-23T16:32:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdpark](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@jdpark](https://discuss.elastic.co/u/jdpark)\
**Post date:** [June 23, 2017, 4:32pm UTC](https://discuss.elastic.co/t/graph-user-defined-edges/90672/1 "2017-06-23T16:32:44Z")

</div>

Hello,

The Graph ([https://www.elastic.co/products/x-pack/graph](https://www.elastic.co/products/x-pack/graph)) looks like a great tool. Is there a way to specify the edges instead of having Elastic figure it out? It looks like Elastic figures out the edges based on concurrences in document (and probably other machine learning that I don't know). However, is it possible to have some sort of schema that this Kibana X-Pack Graph will pickup when rendering the nodes and edges? Thank you.

Johnny

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [June 30, 2017, 4:28pm UTC](https://discuss.elastic.co/t/graph-user-defined-edges/90672/2 "2017-06-30T16:28:53Z")

</div>

> [@jdpark](#):
>
> However, is it possible to have some sort of schema that this Kibana X-Pack Graph will pickup when rendering the nodes and edges?

If you want to take control over relationships it's a matter of creating documents that look more like classic "edge" records with just a single pair of terms to represent nodes e.g. the fact we are connected by this forum post might look like this:

```
{
  "node_ids":["@Mark_Harwood", "@jdpark"]
}

```

You could throw any number of connections together this way e.g.

```
{
  "node_ids":["@Mark_Harwood", "#elasticsearch"]
}

```

Obviously being regular elasticsearch docs you could add other fields here e.g. dates to query and filter the relationships you choose to render as a graph.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d2a69f46ab00a4ffbd3161558f4d8e2af94847a2.png)

---

<div class="post-metadata">

**Author:** ![jdpark](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@jdpark](https://discuss.elastic.co/u/jdpark)\
**Post date:** [July 12, 2017, 3:44pm UTC](https://discuss.elastic.co/t/graph-user-defined-edges/90672/3 "2017-07-12T15:44:25Z")

</div>

Thanks Mark.

For future readers doing something similar, I changed the "certainty" setting to 1 while doing proof of concept. (I was wondering why nodes weren't coming up.) I also found Kibana's "last query" feature very handy to see what Graph API is doing. In general I found the following blogs helpful (one of them is written by Mark).

> **[Using the Elastic Graph on Panama Papers Analysis](https://www.elastic.co/blog/using-elastic-graph-and-kibana-to-analyze-panama-papers)**
>
> How to use the Kibana Graph app and Graph, a new Elasticsearch API, to power forensics and wisdom-of-crowds analysis.

  

> **[Experiments with Elastic’s Graph Tool](https://www.rittmanmead.com/blog/2016/04/experiments-with-elastics-graph-tool/)**
>
> Elastic announced their Graph tool at ElastiCON 2016 (see presentation here). It’s part of the forthcoming X-Pack which bundles Graph along with other helper tools such as Shield and Marvel. Graph itself is two things; an extension of Elasticsearch’s...

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [July 13, 2017, 2:48pm UTC](https://discuss.elastic.co/t/graph-user-defined-edges/90672/4 "2017-07-13T14:48:28Z")

</div>

> [@jdpark](#):
>
> In general I found the following blogs helpfu

You might also find this talk from this year's elasticon useful: [https://www.elastic.co/elasticon/conf/2017/sf/getting-your-data-graph-ready](https://www.elastic.co/elasticon/conf/2017/sf/getting-your-data-graph-ready)

---

<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:** [August 10, 2017, 2:48pm UTC](https://discuss.elastic.co/t/graph-user-defined-edges/90672/5 "2017-08-10T14:48:50Z")

</div>

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