# How to Create Relationship between document in graph

**URL:** <https://discuss.elastic.co/t/how-to-create-relationship-between-document-in-graph/116577>\
**Category:** Kibana\
**Tags:** elastic-stack-graph\
**Created:** [January 23, 2018, 3:42am UTC](https://discuss.elastic.co/t/how-to-create-relationship-between-document-in-graph/116577 "2018-01-23T03:42:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krishnaraj221193](https://avatars.discourse-cdn.com/v4/letter/k/85e7bf/32.png) [@krishnaraj221193](https://discuss.elastic.co/u/krishnaraj221193)\
**Post date:** [January 23, 2018, 3:42am UTC](https://discuss.elastic.co/t/how-to-create-relationship-between-document-in-graph/116577/1 "2018-01-23T03:42:05Z")

</div>

Hi sir,  
Im trying to create documents in kibana plugin but i need to know how to create a relation in graph for document

---

<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:** [January 23, 2018, 9:23am UTC](https://discuss.elastic.co/t/how-to-create-relationship-between-document-in-graph/116577/2 "2018-01-23T09:23:29Z")

</div>

> [@krishnaraj221193](#):
>
> how to create a relation in graph for document

A relationship is a connection between two terms formed by one or more documents containing that term.  
The terms could be from different single-value fields (e.g. `clickedProduct` and `searchTerm`) or from a field which is an array of terms (e.g. `products`).

The `use_significance` option will prioritise significant relationships (e.g. highlighting that `pasta` and `tomato sauce` are highly correlated products in purchase histories) but if turned off then relationships are ranked according to a simple popularity measure which may provide true but less meaningful links (eg many people who buy `pasta` also buy `toilet roll`).

The docs provide more detail: [Graph explore API | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html)

---

<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:** [February 20, 2018, 9:23am UTC](https://discuss.elastic.co/t/how-to-create-relationship-between-document-in-graph/116577/3 "2018-02-20T09:23:36Z")

</div>

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