# Combining rivers into one document

**URL:** <https://discuss.elastic.co/t/combining-rivers-into-one-document/14255>\
**Category:** Elasticsearch\
**Created:** [November 5, 2013, 8:24am UTC](https://discuss.elastic.co/t/combining-rivers-into-one-document/14255 "2013-11-05T08:24:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Beernink](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@Peter\_Beernink](https://discuss.elastic.co/u/Peter_Beernink)\
**Post date:** [November 5, 2013, 8:24am UTC](https://discuss.elastic.co/t/combining-rivers-into-one-document/14255/1 "2013-11-05T08:24:20Z")

</div>

For a project I'm currently working on I have two rivers, one JDBC and a  
CouchDB river, each going to the same index, but a different type. The  
documents comming from this rivers are related to each other: The JDBC  
river gives basic product information and the CouchDB gives extended  
product information.

Now I want to search for documents based on two fields, one on each type.  
As Elasticsearch doesn't support joining documents (at least not for as far  
as I can see), I was searching for a way of combining the to rivers into 1  
document, but it looks like the documents get overwritten instead of  
extended with the new properties.

Is this kind of behavior possible or should I approach this in a different  
way?

--  
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:** [November 5, 2013, 8:35am UTC](https://discuss.elastic.co/t/combining-rivers-into-one-document/14255/2 "2013-11-05T08:35:03Z")

</div>

Definitely you should manage that in an other tool or layer.  
For example in a service layer or using an ETL.

Rivers are not designed to aggregate documents from different sources. It's just a helper to start very quickly with elasticsearch but at the end of the day, most of the users prefers to manage that injection process from outside elasticsearch nodes themselves.

My 2 cents

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

5 novembre 2013 at 09:24:24, Peter Beernink ([beerninkp@gmail.com](mailto:beerninkp@gmail.com)) a écrit:

For a project I'm currently working on I have two rivers, one JDBC and a CouchDB river, each going to the same index, but a different type. The documents comming from this rivers are related to each other: The JDBC river gives basic product information and the CouchDB gives extended product information.

Now I want to search for documents based on two fields, one on each type. As Elasticsearch doesn't support joining documents (at least not for as far as I can see), I was searching for a way of combining the to rivers into 1 document, but it looks like the documents get overwritten instead of extended with the new properties.

Is this kind of behavior possible or should I approach this in a different way?

--  
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:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 5, 2013, 11:41am UTC](https://discuss.elastic.co/t/combining-rivers-into-one-document/14255/3 "2013-11-05T11:41:18Z")

</div>

+1 for David

Please note that JDBC river is not a product and can not provide product  
information.

It is just a helper to quickly load some data into ES, for example, to  
convince the boss for a POC within a few hours or days. There is no  
intention to replace ETL products.

Jörg

--  
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:08am UTC](https://discuss.elastic.co/t/combining-rivers-into-one-document/14255/4 "2017-07-06T02:08:53Z")

</div>


