# Oracle's connect\_by query in ES

**URL:** <https://discuss.elastic.co/t/oracles-connect-by-query-in-es/14050>\
**Category:** Elasticsearch\
**Created:** [October 22, 2013, 6:06am UTC](https://discuss.elastic.co/t/oracles-connect-by-query-in-es/14050 "2013-10-22T06:06:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![psstv2010](https://avatars.discourse-cdn.com/v4/letter/p/db5fbb/32.png) [@psstv2010](https://discuss.elastic.co/u/psstv2010)\
**Post date:** [October 22, 2013, 6:06am UTC](https://discuss.elastic.co/t/oracles-connect-by-query-in-es/14050/1 "2013-10-22T06:06:06Z")

</div>

Hi

I am very newbie in ElasticSearch and got a too big problem to solve by  
myself.

Someone in my company told me that what I am trying to do can be easily  
solved if I used Oracle's connect\_by query, but I don't have Oracle but  
Elasticsearch, so would like to ask for a help.

I would like to query against more than one indexes and they have some keys  
in common. So, when querying, I'd like to merge a record into a single row  
in the output. The following is my examples.

Sample1 KEY Depth Tag 1001 10 Case 1002 20 Case Sample2 KEY Depth  
Tag 1001 10 Control Sample3 KEY Depth Case 1002 10 Case Output  
KEY CaseDepth Controdepth 1001 10 10 1002 20;10  
Using those three samples, for "1001" key, the value of "Depth" field, is  
10 for both "Case and Control" tag.  
I need to show case and control "Depth" values separately.

Is it possible to do so in ElasticSearch?  
Any suggestion?

Thanks  
T.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 22, 2013, 6:36am UTC](https://discuss.elastic.co/t/oracles-connect-by-query-in-es/14050/2 "2013-10-22T06:36:33Z")

</div>

May be you are looking for [https://github.com/elasticsearch/elasticsearch/pull/3278?source=cc](https://github.com/elasticsearch/elasticsearch/pull/3278?source=cc)?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 22 oct. 2013 à 08:06, [psstv2010@gmail.com](mailto:psstv2010@gmail.com) a écrit :

Hi

I am very newbie in ElasticSearch and got a too big problem to solve by myself.

Someone in my company told me that what I am trying to do can be easily solved if I used Oracle's connect\_by query, but I don't have Oracle but Elasticsearch, so would like to ask for a help.

I would like to query against more than one indexes and they have some keys in common. So, when querying, I'd like to merge a record into a single row in the output. The following is my examples.

Sample1   
KEY Depth Tag  
1001 10 Case  
1002 20 Case  
Sample2   
KEY Depth Tag  
1001 10 Control  
Sample3   
KEY Depth Case  
1002 10 Case  
Output   
KEY CaseDepth Controdepth  
1001 10 10  
1002 20;10   
Using those three samples, for "1001" key, the value of "Depth" field, is 10 for both "Case and Control" tag.  
I need to show case and control "Depth" values separately.

Is it possible to do so in ElasticSearch?  
Any suggestion?

Thanks  
T.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 2:11am UTC](https://discuss.elastic.co/t/oracles-connect-by-query-in-es/14050/3 "2017-07-06T02:11:15Z")

</div>

Closed on July 6, 2017, 2:11am UTC


