# How to display only direct connections on elastic Graph

**URL:** <https://discuss.elastic.co/t/how-to-display-only-direct-connections-on-elastic-graph/321848>\
**Category:** Kibana\
**Tags:** elastic-stack-graph\
**Created:** [December 22, 2022, 2:45pm UTC](https://discuss.elastic.co/t/how-to-display-only-direct-connections-on-elastic-graph/321848 "2022-12-22T14:45:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leonardo\_Carlos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leonardo_carlos/32/115104_2.png) [@Leonardo\_Carlos](https://discuss.elastic.co/u/Leonardo_Carlos)\
**Post date:** [December 22, 2022, 2:45pm UTC](https://discuss.elastic.co/t/how-to-display-only-direct-connections-on-elastic-graph/321848/1 "2022-12-22T14:45:11Z")

</div>

Hello everyone,

We would like to know how we could display only direct connections through the Elastic Graph functionality. Currently, we are only able to see all connections in a shot which is making a certain difficulty to manage the data. Unfortunately, no articles haven't been found on the internet. In summary, from the attached file

 ![MicrosoftTeams-image (3)](https://us1.discourse-cdn.com/elastic/original/3X/8/1/815e91d600cb09d9673bc367b5af78910bb43f72.png)  
e'd like to visualize only 'linked' connections.

Having any additional questions, feel free to reach out to us.

Thanks,  
Lauda

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [December 22, 2022, 3:12pm UTC](https://discuss.elastic.co/t/how-to-display-only-direct-connections-on-elastic-graph/321848/2 "2022-12-22T15:12:37Z")

</div>

Hi @Leonardo_Carlos ,

welcome to the Kibana community.  
What you mean by direction connections precisely?

The Graph app works using the ES Graph API which looks for co-occurrencies of terms, so a `fromSigla.keyword` term (take `CONTROL-M` in your chart) is connected to a `Sigla.keyword` term (take `OR` term in the chart) if both terms are in the same document.  
The more fields in the configuration, the more connection will be brought to the graph representation (as the co-occurrence will be computed from each term to any other term of other fields).

---

<div class="post-metadata">

**Author:** ![Leonardo\_Carlos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leonardo_carlos/32/115104_2.png) [@Leonardo\_Carlos](https://discuss.elastic.co/u/Leonardo_Carlos)\
**Post date:** [December 22, 2022, 4:31pm UTC](https://discuss.elastic.co/t/how-to-display-only-direct-connections-on-elastic-graph/321848/3 "2022-12-22T16:31:56Z")

</div>

Hello  
I would like it to bring me the only direct connections from the selected "Sigla".  
Example:  
I filter the Sigla TKM (1 node) and I want to show the "Siglas" that connect with this node.

But when I plot the graph it brings me the Sigla"TKM" connected to other siglas and brings me other siglas that are not directly connected to the main sigla"TKM".  
they connect with siglas that connect to sigla "TKM"

---

<div class="post-metadata">

**Author:** ![Leonardo\_Carlos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leonardo_carlos/32/115104_2.png) [@Leonardo\_Carlos](https://discuss.elastic.co/u/Leonardo_Carlos)\
**Post date:** [December 23, 2022, 2:29pm UTC](https://discuss.elastic.co/t/how-to-display-only-direct-connections-on-elastic-graph/321848/4 "2022-12-23T14:29:04Z")

</div>

For example. i have this dataset.

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

if I send the two fields above as a parameter, I expect it to create 1 node for the main TKM and the other nodes according to the "FromSigla" field.  
But when I plot the graph see how it looks  
 ![Plot_TKM](https://us1.discourse-cdn.com/elastic/original/3X/9/f/9f8932ffccf6f45f883d42ae6836a3d4636cebd1.png)

I drew what I hope he plots

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

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [December 30, 2022, 8:44am UTC](https://discuss.elastic.co/t/how-to-display-only-direct-connections-on-elastic-graph/321848/5 "2022-12-30T08:44:18Z")

</div>

I see what you are looking for.  
The Graph API works in terms of values rather than simply fields, so the `AA` value term will be connected with other values which appear in the same record, given the `fromSigla` field as an array of terms.

---

<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:** [January 27, 2023, 8:45am UTC](https://discuss.elastic.co/t/how-to-display-only-direct-connections-on-elastic-graph/321848/6 "2023-01-27T08:45:07Z")

</div>

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