# Real Time Python Update on a River

**URL:** <https://discuss.elastic.co/t/real-time-python-update-on-a-river/16591>\
**Category:** Elasticsearch\
**Created:** [March 25, 2014, 4:38pm UTC](https://discuss.elastic.co/t/real-time-python-update-on-a-river/16591 "2014-03-25T16:38:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thibaut\_Lapierre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thibaut_lapierre/32/1693_2.png) [@Thibaut\_Lapierre](https://discuss.elastic.co/u/Thibaut_Lapierre)\
**Post date:** [March 25, 2014, 4:38pm UTC](https://discuss.elastic.co/t/real-time-python-update-on-a-river/16591/1 "2014-03-25T16:38:28Z")

</div>

Hi,  
I use the twitter river who use bulk indexing.

I have a Python script who analyse tweets and return some data.  
So i want to analyse each tweet and add two fields to the river with the  
returned data.

Maybe i can build a second sheme with id and treatment status in order to  
run the script separately and update each doc, but i'm pretty sure there is  
a cleaner/easier solution.

Thanks for helping

Thibaut

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a480947a-5790-4b84-838e-c0d37c191079%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a480947a-5790-4b84-838e-c0d37c191079%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Honza\_Kral](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/honza_kral/32/876_2.png) [@Honza\_Kral](https://discuss.elastic.co/u/Honza_Kral)\
**Post date:** [March 26, 2014, 1:55pm UTC](https://discuss.elastic.co/t/real-time-python-update-on-a-river/16591/2 "2014-03-26T13:55:01Z")

</div>

Hi,

I am afraid the easiest solution here is to not use rivers but instead  
do the loading yourself - using a dedicated python process to consume  
the twitter stream, enriching the data and loading it into  
elasticsearch using the stream\_bulk helper in the official python  
client (0).

0 - [Helpers — Python Elasticsearch client 8.11.0 documentation](http://elasticsearch-py.readthedocs.org/en/latest/helpers.html#elasticsearch.helpers.streaming_bulk)

Hope this helps,  
Honza

On Tue, Mar 25, 2014 at 5:38 PM, Thibaut Lapierre  
[thibaut.lapierre@gmail.com](mailto:thibaut.lapierre@gmail.com) wrote:

> Hi,  
> I use the twitter river who use bulk indexing.
> 
> I have a Python script who analyse tweets and return some data.  
> So i want to analyse each tweet and add two fields to the river with the  
> returned data.
> 
> Maybe i can build a second sheme with id and treatment status in order to  
> run the script separately and update each doc, but i'm pretty sure there is  
> a cleaner/easier solution.
> 
> Thanks for helping
> 
> Thibaut
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/a480947a-5790-4b84-838e-c0d37c191079%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a480947a-5790-4b84-838e-c0d37c191079%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CABfdDirZK3-bhP4kZU%2B3szYTK%2BJBibdswT%3DuVJrFWqRk%2BB8u4A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CABfdDirZK3-bhP4kZU%2B3szYTK%2BJBibdswT%3DuVJrFWqRk%2BB8u4A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:40am UTC](https://discuss.elastic.co/t/real-time-python-update-on-a-river/16591/3 "2017-07-06T01:40:35Z")

</div>

Closed on July 6, 2017, 1:40am UTC


