# CouchDB river and flush index in ES

**URL:** <https://discuss.elastic.co/t/couchdb-river-and-flush-index-in-es/5009>\
**Category:** Elasticsearch\
**Created:** [July 31, 2011, 6:06pm UTC](https://discuss.elastic.co/t/couchdb-river-and-flush-index-in-es/5009 "2011-07-31T18:06:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marvin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marvin/32/1688_2.png) [@marvin](https://discuss.elastic.co/u/marvin)\
**Post date:** [July 31, 2011, 6:06pm UTC](https://discuss.elastic.co/t/couchdb-river-and-flush-index-in-es/5009/1 "2011-07-31T18:06:48Z")

</div>

Hi,  
I have couch db with ~500k docs and couchdb river with configuration from  
example [http://www.elasticsearch.org/guide/reference/river/couchdb.html](http://www.elasticsearch.org/guide/reference/river/couchdb.html).  
After update document in couch the changes in ES come effect after some  
period (5 - 15 seconds).  
Using \*flush[http://www.elasticsearch.org/guide/reference/api/admin-indices-flush.html](http://www.elasticsearch.org/guide/reference/api/admin-indices-flush.html)  
, \*after each update document in couch, helps to take changes in ES  
immediatelly.  
But it seems it's not good practice.  
Maybe has another way to resolve my problem?

Thanks.

---

<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:** [August 1, 2011, 6:04am UTC](https://discuss.elastic.co/t/couchdb-river-and-flush-index-in-es/5009/2 "2011-08-01T06:04:03Z")

</div>

Flush has nothing to do with indexed document from couchdb. When searching  
for documents indexed from couchdb, there two important time based aspects:

1. How long does it take to get it from the \_changes stream and index it.
2. The refresh interval which controls when an indexed document will become  
visible, defaults to 1 second.

-shay.banon

On Sun, Jul 31, 2011 at 9:06 PM, Marvin [mailvovana@gmail.com](mailto:mailvovana@gmail.com) wrote:

> Hi,  
> I have couch db with ~500k docs and couchdb river with configuration from  
> example [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/river/couchdb.html).  
> After update document in couch the changes in ES come effect after some  
> period (5 - 15 seconds).  
> Using \*flush[http://www.elasticsearch.org/guide/reference/api/admin-indices-flush.html](http://www.elasticsearch.org/guide/reference/api/admin-indices-flush.html)  
> , \*after each update document in couch, helps to take changes in ES  
> immediatelly.  
> But it seems it's not good practice.  
> Maybe has another way to resolve my problem?
> 
> Thanks.

---

<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:58am UTC](https://discuss.elastic.co/t/couchdb-river-and-flush-index-in-es/5009/3 "2017-07-06T03:58:43Z")

</div>


