# A question about the confluence of rivers

**URL:** <https://discuss.elastic.co/t/a-question-about-the-confluence-of-rivers/7304>\
**Category:** Elasticsearch\
**Created:** [April 12, 2012, 8:07am UTC](https://discuss.elastic.co/t/a-question-about-the-confluence-of-rivers/7304 "2012-04-12T08:07:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![benny\_sadeh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benny_sadeh/32/2797_2.png) [@benny\_sadeh](https://discuss.elastic.co/u/benny_sadeh)\
**Post date:** [April 12, 2012, 8:07am UTC](https://discuss.elastic.co/t/a-question-about-the-confluence-of-rivers/7304/1 "2012-04-12T08:07:17Z")

</div>

my understanding is that when you define/create a river (such as the  
rabbitmq river), you define an index it flows into.  
my questions are:

- can two rivers flow into one index?
- can a river flow into an existing index?
- the implied question is whether the same index can be fed both by a  
river and a normal indexing api call

and since we are on the subject of rivers, is there a hook for a river  
to preprocess an entry _before_ it is being index (river -\>  
[process-or-filter] -\> index)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 13, 2012, 12:16pm UTC](https://discuss.elastic.co/t/a-question-about-the-confluence-of-rivers/7304/2 "2012-04-13T12:16:34Z")

</div>

On Thu, Apr 12, 2012 at 11:07 AM, Benny Sadeh [benny.sadeh@gmail.com](mailto:benny.sadeh@gmail.com) wrote:

> my understanding is that when you define/create a river (such as the  
> rabbitmq river), you define an index it flows into.  
> my questions are:
> 
> - can two rivers flow into one index?
> 
> Yes, they simply perform index operations against that index.

> - can a river flow into an existing index?
> 
> Yep.

> - the implied question is whether the same index can be fed both by a  
> river and a normal indexing api call
> 
> Yep.

> and since we are on the subject of rivers, is there a hook for a river  
> to preprocess an entry _before_ it is being index (river -\>  
> [process-or-filter] -\> index)

There is some support for it in certain rivers, the rabbitmq does not as it  
assumes the message that you send is already processed.

---

<div class="post-metadata">

**Author:** ![benny\_sadeh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benny_sadeh/32/2797_2.png) [@benny\_sadeh](https://discuss.elastic.co/u/benny_sadeh)\
**Post date:** [April 14, 2012, 5:47am UTC](https://discuss.elastic.co/t/a-question-about-the-confluence-of-rivers/7304/3 "2012-04-14T05:47:25Z")

</div>

thanks for answering Shay; you're always very responsive, and I  
appreciate that 🙂

On Apr 13, 5:16 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> On Thu, Apr 12, 2012 at 11:07 AM, Benny Sadeh [benny.sa...@gmail.com](mailto:benny.sa...@gmail.com) wrote:
> 
> > my understanding is that when you define/create a river (such as the  
> > rabbitmq river), you define an index it flows into.  
> > my questions are:
> 
> > - can two rivers flow into one index?
> 
> > Yes, they simply perform index operations against that index.
> 
> > - can a river flow into an existing index?
> 
> > Yep.
> 
> > - the implied question is whether the same index can be fed both by a  
> > river and a normal indexing api call
> 
> > Yep.

great, but how?

for example, assuming I created an index such as:  
curl -XPUT [http://localhost:9200/](http://localhost:9200/)/ -d '{ ...

then when creating a rabbitmq river, if I would specify:  
curl -XPUT 'localhost:9200/\_river//\_meta' -d  
'{  
"type" : "rabbitmq",  
"rabbitmq" : {  
...  
},  
"index" : {  
...  
}  
}'  
I was assuming this would be a different index: \_river/ rather the   
am I wrong and this would be one and the same index?

> > and since we are on the subject of rivers, is there a hook for a river  
> > to preprocess an entry _before_ it is being index (river -\>  
> > [process-or-filter] -\> index)
> 
> There is some support for it in certain rivers, the rabbitmq does not as it  
> assumes the message that you send is already processed.

so I assume if one wanted such [process-or-filter] river  
functionality, one could just fork the river implementation and change  
it to do so. I was just wondering if there is a "hook" method to do  
so, or an agreed/by-convention way.  
since I haven't looked into how to implement a river docs yet, if the  
answer is in there, please tell me if I should just rtfm 😉

---

<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, 3:32am UTC](https://discuss.elastic.co/t/a-question-about-the-confluence-of-rivers/7304/4 "2017-07-06T03:32:36Z")

</div>

Closed on July 6, 2017, 3:32am UTC


