# Detecting whether elasticsearch has finished indexing after adding documents

**URL:** <https://discuss.elastic.co/t/detecting-whether-elasticsearch-has-finished-indexing-after-adding-documents/16422>\
**Category:** Elasticsearch\
**Created:** [March 18, 2014, 12:39pm UTC](https://discuss.elastic.co/t/detecting-whether-elasticsearch-has-finished-indexing-after-adding-documents/16422 "2014-03-18T12:39:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Coulton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_coulton/32/1722_2.png) [@Andrew\_Coulton](https://discuss.elastic.co/u/Andrew_Coulton)\
**Post date:** [March 18, 2014, 12:39pm UTC](https://discuss.elastic.co/t/detecting-whether-elasticsearch-has-finished-indexing-after-adding-documents/16422/1 "2014-03-18T12:39:00Z")

</div>

Hi,

Is there a way to check whether the index (and couchdb river) are up to  
date with changes after we add a batch of documents? We have a workflow  
that involves adding new content to the index and then running some reports  
against it, but obviously I need to wait to run the reports until all the  
changes are in the index.

I've had a look at the various status request/responses, and a fair bit of  
googling around, but I can't see anything obvious - quite possible I've  
missed it though.

Thanks,

Andrew

--  
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/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [March 18, 2014, 12:47pm UTC](https://discuss.elastic.co/t/detecting-whether-elasticsearch-has-finished-indexing-after-adding-documents/16422/2 "2014-03-18T12:47:14Z")

</div>

The only thing I can think about is by get \_seq document from couchdb river.

curl -XGET 'localhost:9200/\_river/my\_db/\_seq'  
And see if `last_seq` field has the same value as the couchdb \_changes API has.

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

Le 18 mars 2014 à 13:39:04, Andrew Coulton ([andrew@ingenerator.com](mailto:andrew@ingenerator.com)) a écrit:

Hi,

Is there a way to check whether the index (and couchdb river) are up to date with changes after we add a batch of documents? We have a workflow that involves adding new content to the index and then running some reports against it, but obviously I need to wait to run the reports until all the changes are in the index.

I've had a look at the various status request/responses, and a fair bit of googling around, but I can't see anything obvious - quite possible I've missed it though.

Thanks,

## Andrew

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/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%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/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Andrew\_Coulton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_coulton/32/1722_2.png) [@Andrew\_Coulton](https://discuss.elastic.co/u/Andrew_Coulton)\
**Post date:** [March 18, 2014, 2:05pm UTC](https://discuss.elastic.co/t/detecting-whether-elasticsearch-has-finished-indexing-after-adding-documents/16422/3 "2014-03-18T14:05:39Z")

</div>

David,

Thanks - that makes sense. Do you happen to know if the last\_seq gets  
updated once the document has been indexed, or just once it's been posted  
into the elasticsearch queue?

Andrew

On 18 March 2014 12:47, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> The only thing I can think about is by get \_seq document from couchdb  
> river.
> 
> curl -XGET 'localhost:9200/\_river/my\_db/\_seq'
> 
> And see if `last_seq` field has the same value as the couchdb \_changes API  
> has.
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 18 mars 2014 à 13:39:04, Andrew Coulton ([andrew@ingenerator.com](mailto:andrew@ingenerator.com)) a  
> écrit:
> 
> Hi,
> 
> Is there a way to check whether the index (and couchdb river) are up to  
> date with changes after we add a batch of documents? We have a workflow  
> that involves adding new content to the index and then running some reports  
> against it, but obviously I need to wait to run the reports until all the  
> changes are in the index.
> 
> I've had a look at the various status request/responses, and a fair bit of  
> googling around, but I can't see anything obvious - quite possible I've  
> missed it though.
> 
> Thanks,
> 
> ## Andrew
> 
> 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/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> 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 a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe](https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local)[https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Andrew Coulton  
Founder  
inGenerator Ltd

Follow us on Twitter @inGenerator  
Phone us on 0131 510 0271

inGenerator Ltd is a company registered in Scotland (no SC435161) with its  
registered office at 8 Craigleith Hill Row, Edinburgh EH4 2JX.

--  
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/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [March 18, 2014, 2:32pm UTC](https://discuss.elastic.co/t/detecting-whether-elasticsearch-has-finished-indexing-after-adding-documents/16422/4 "2014-03-18T14:32:25Z")

</div>

IIRC as soon as docs have been sent to BulkProcessor. Which means that it's not synchronized.

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

> Le 18 mars 2014 à 15:05, Andrew Coulton [andrew@ingenerator.com](mailto:andrew@ingenerator.com) a écrit :
> 
> David,
> 
> Thanks - that makes sense. Do you happen to know if the last\_seq gets updated once the document has been indexed, or just once it's been posted into the elasticsearch queue?
> 
> Andrew
> 
> > On 18 March 2014 12:47, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
> > The only thing I can think about is by get \_seq document from couchdb river.
> > 
> > curl -XGET 'localhost:9200/\_river/my\_db/\_seq'  
> > And see if `last_seq` field has the same value as the couchdb \_changes API has.
> > 
> > --  
> > David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
> > @dadoonet | @elasticsearchfr
> > 
> > > Le 18 mars 2014 à 13:39:04, Andrew Coulton ([andrew@ingenerator.com](mailto:andrew@ingenerator.com)) a écrit:
> > > 
> > > Hi,
> > > 
> > > Is there a way to check whether the index (and couchdb river) are up to date with changes after we add a batch of documents? We have a workflow that involves adding new content to the index and then running some reports against it, but obviously I need to wait to run the reports until all the changes are in the index.
> > > 
> > > I've had a look at the various status request/responses, and a fair bit of googling around, but I can't see anything obvious - quite possible I've missed it though.
> > > 
> > > Thanks,
> > > 
> > > ## Andrew
> > > 
> > > 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/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%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 a topic in the Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit [https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe](https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe).  
> > To unsubscribe from this group and all its topics, 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/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local).
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Andrew Coulton  
> Founder  
> inGenerator Ltd
> 
> Follow us on Twitter @inGenerator  
> Phone us on 0131 510 0271
> 
> ## inGenerator Ltd is a company registered in Scotland (no SC435161) with its registered office at 8 Craigleith Hill Row, Edinburgh EH4 2JX.
> 
> 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/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.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/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Andrew\_Coulton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_coulton/32/1722_2.png) [@Andrew\_Coulton](https://discuss.elastic.co/u/Andrew_Coulton)\
**Post date:** [March 19, 2014, 8:30am UTC](https://discuss.elastic.co/t/detecting-whether-elasticsearch-has-finished-indexing-after-adding-documents/16422/5 "2014-03-19T08:30:48Z")

</div>

Thanks David - and is there any status anywhere that shows if BulkProcessor  
is finished?

Cheers,  
Andrew

On 18 March 2014 14:32, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> IIRC as soon as docs have been sent to BulkProcessor. Which means that  
> it's not synchronized.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 18 mars 2014 à 15:05, Andrew Coulton [andrew@ingenerator.com](mailto:andrew@ingenerator.com) a écrit :
> 
> David,
> 
> Thanks - that makes sense. Do you happen to know if the last\_seq gets  
> updated once the document has been indexed, or just once it's been posted  
> into the elasticsearch queue?
> 
> Andrew
> 
> On 18 March 2014 12:47, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > The only thing I can think about is by get \_seq document from couchdb  
> > river.
> > 
> > curl -XGET 'localhost:9200/\_river/my\_db/\_seq'
> > 
> > And see if `last_seq` field has the same value as the couchdb \_changes  
> > API has.
> > 
> > --  
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)  
> > [http://Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 18 mars 2014 à 13:39:04, Andrew Coulton ([andrew@ingenerator.com](mailto:andrew@ingenerator.com)) a  
> > écrit:
> > 
> > Hi,
> > 
> > Is there a way to check whether the index (and couchdb river) are up to  
> > date with changes after we add a batch of documents? We have a workflow  
> > that involves adding new content to the index and then running some reports  
> > against it, but obviously I need to wait to run the reports until all the  
> > changes are in the index.
> > 
> > I've had a look at the various status request/responses, and a fair bit  
> > of googling around, but I can't see anything obvious - quite possible I've  
> > missed it though.
> > 
> > Thanks,
> > 
> > ## Andrew
> > 
> > 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/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > 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 a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe](https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe).  
> > To unsubscribe from this group and all its topics, 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/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local)[https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Andrew Coulton  
> Founder  
> inGenerator Ltd
> 
> Follow us on Twitter @inGenerator  
> Phone us on 0131 510 0271
> 
> inGenerator Ltd is a company registered in Scotland (no SC435161) with  
> its registered office at 8 Craigleith Hill Row, Edinburgh EH4 2JX.
> 
> --  
> 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/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> 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 a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe](https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr)[https://groups.google.com/d/msgid/elasticsearch/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Andrew Coulton  
Founder  
inGenerator Ltd

Follow us on Twitter @inGenerator  
Phone us on 0131 510 0271

inGenerator Ltd is a company registered in Scotland (no SC435161) with its  
registered office at 8 Craigleith Hill Row, Edinburgh EH4 2JX.

--  
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/CAN3TXFdZbm0nYcwKpK5wGtJgn-E-KhPFP4n6mb3cQg%2BpS99JDQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFdZbm0nYcwKpK5wGtJgn-E-KhPFP4n6mb3cQg%2BpS99JDQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [March 19, 2014, 9:01am UTC](https://discuss.elastic.co/t/detecting-whether-elasticsearch-has-finished-indexing-after-adding-documents/16422/6 "2014-03-19T09:01:31Z")

</div>

When looking at code [https://github.com/elasticsearch/elasticsearch-river-couchdb/blob/master/src/main/java/org/elasticsearch/river/couchdb/CouchdbRiver.java#L428](https://github.com/elasticsearch/elasticsearch-river-couchdb/blob/master/src/main/java/org/elasticsearch/river/couchdb/CouchdbRiver.java#L428)

It sounds like \_seq is added to BulkProcessor itself at the end.  
That means to me that when \_seq doc is updated you know that you have processed all elements before that \_seq number.

Makes sense?

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

Le 19 mars 2014 à 09:30:51, Andrew Coulton ([andrew@ingenerator.com](mailto:andrew@ingenerator.com)) a écrit:

Thanks David - and is there any status anywhere that shows if BulkProcessor is finished?

Cheers,  
Andrew

On 18 March 2014 14:32, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
IIRC as soon as docs have been sent to BulkProcessor. Which means that it's not synchronized.

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

Le 18 mars 2014 à 15:05, Andrew Coulton [andrew@ingenerator.com](mailto:andrew@ingenerator.com) a écrit :

David,

Thanks - that makes sense. Do you happen to know if the last\_seq gets updated once the document has been indexed, or just once it's been posted into the elasticsearch queue?

Andrew

On 18 March 2014 12:47, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
The only thing I can think about is by get \_seq document from couchdb river.

curl -XGET 'localhost:9200/\_river/my\_db/\_seq'  
And see if `last_seq` field has the same value as the couchdb \_changes API has.

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

Le 18 mars 2014 à 13:39:04, Andrew Coulton ([andrew@ingenerator.com](mailto:andrew@ingenerator.com)) a écrit:

Hi,

Is there a way to check whether the index (and couchdb river) are up to date with changes after we add a batch of documents? We have a workflow that involves adding new content to the index and then running some reports against it, but obviously I need to wait to run the reports until all the changes are in the index.

I've had a look at the various status request/responses, and a fair bit of googling around, but I can't see anything obvious - quite possible I've missed it though.

Thanks,

## Andrew

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/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%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 a topic in the Google Groups "elasticsearch" group.  
To unsubscribe from this topic, visit [https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe](https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe).  
To unsubscribe from this group and all its topics, 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/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local).

For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Andrew Coulton  
Founder  
inGenerator Ltd

Follow us on Twitter @inGenerator  
Phone us on 0131 510 0271

## inGenerator Ltd is a company registered in Scotland (no SC435161) with its registered office at 8 Craigleith Hill Row, Edinburgh EH4 2JX.

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/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.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 a topic in the Google Groups "elasticsearch" group.  
To unsubscribe from this topic, visit [https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe](https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe).  
To unsubscribe from this group and all its topics, 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/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr).

For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Andrew Coulton  
Founder  
inGenerator Ltd

Follow us on Twitter @inGenerator  
Phone us on 0131 510 0271

## inGenerator Ltd is a company registered in Scotland (no SC435161) with its registered office at 8 Craigleith Hill Row, Edinburgh EH4 2JX.

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/CAN3TXFdZbm0nYcwKpK5wGtJgn-E-KhPFP4n6mb3cQg%2BpS99JDQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFdZbm0nYcwKpK5wGtJgn-E-KhPFP4n6mb3cQg%2BpS99JDQ%40mail.gmail.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/etPan.53295ceb.1ba026fa.97ca%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53295ceb.1ba026fa.97ca%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Andrew\_Coulton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_coulton/32/1722_2.png) [@Andrew\_Coulton](https://discuss.elastic.co/u/Andrew_Coulton)\
**Post date:** [March 19, 2014, 9:07am UTC](https://discuss.elastic.co/t/detecting-whether-elasticsearch-has-finished-indexing-after-adding-documents/16422/7 "2014-03-19T09:07:03Z")

</div>

David, thanks - that does make sense. I'll work with that and see how I get  
on. Really appreciate the assistance.

Andrew

On 19 March 2014 09:01, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> When looking at code  
> [https://github.com/elasticsearch/elasticsearch-river-couchdb/blob/master/src/main/java/org/elasticsearch/river/couchdb/CouchdbRiver.java#L428](https://github.com/elasticsearch/elasticsearch-river-couchdb/blob/master/src/main/java/org/elasticsearch/river/couchdb/CouchdbRiver.java#L428)
> 
> It sounds like \_seq is added to BulkProcessor itself at the end.  
> That means to me that when \_seq doc is updated you know that you have  
> processed all elements before that \_seq number.
> 
> Makes sense?
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 19 mars 2014 à 09:30:51, Andrew Coulton ([andrew@ingenerator.com](mailto:andrew@ingenerator.com)) a  
> écrit:
> 
> Thanks David - and is there any status anywhere that shows if  
> BulkProcessor is finished?
> 
> Cheers,  
> Andrew
> 
> On 18 March 2014 14:32, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > IIRC as soon as docs have been sent to BulkProcessor. Which means that  
> > it's not synchronized.
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 18 mars 2014 à 15:05, Andrew Coulton [andrew@ingenerator.com](mailto:andrew@ingenerator.com) a  
> > écrit :
> > 
> > David,
> > 
> > Thanks - that makes sense. Do you happen to know if the last\_seq gets  
> > updated once the document has been indexed, or just once it's been posted  
> > into the elasticsearch queue?
> > 
> > Andrew
> > 
> > On 18 March 2014 12:47, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> > 
> > > The only thing I can think about is by get \_seq document from couchdb  
> > > river.
> > > 
> > > curl -XGET 'localhost:9200/\_river/my\_db/\_seq'
> > > 
> > > And see if `last_seq` field has the same value as the couchdb \_changes  
> > > API has.
> > > 
> > > ```
> > > --
> > > 
> > > ```
> > > 
> > > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)  
> > > [http://Elasticsearch.com](http://Elasticsearch.com)_  
> > > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > > 
> > > Le 18 mars 2014 à 13:39:04, Andrew Coulton ([andrew@ingenerator.com](mailto:andrew@ingenerator.com)) a  
> > > écrit:
> > > 
> > > Hi,
> > > 
> > > Is there a way to check whether the index (and couchdb river) are up to  
> > > date with changes after we add a batch of documents? We have a workflow  
> > > that involves adding new content to the index and then running some reports  
> > > against it, but obviously I need to wait to run the reports until all the  
> > > changes are in the index.
> > > 
> > > I've had a look at the various status request/responses, and a fair bit  
> > > of googling around, but I can't see anything obvious - quite possible I've  
> > > missed it though.
> > > 
> > > Thanks,
> > > 
> > > ## Andrew
> > > 
> > > 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/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8074a203-24b5-4c45-82a6-53b012997920%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > 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 a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe](https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe).  
> > > To unsubscribe from this group and all its topics, 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/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local)[https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/etPan.53284052.3d1b58ba.97ca%40MacBook-Air-de-David.local?utm_medium=email&utm_source=footer).
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > Andrew Coulton  
> > Founder  
> > inGenerator Ltd
> > 
> > Follow us on Twitter @inGenerator  
> > Phone us on 0131 510 0271
> > 
> > ## inGenerator Ltd is a company registered in Scotland (no SC435161) with its registered office at 8 Craigleith Hill Row, Edinburgh EH4 2JX.
> > 
> > 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/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFc-y4VDwk105UYHsbNg9zEYav-SgNsWOwjO7VjVb%3DKtCQ%40mail.gmail.com?utm_medium=email&utm_source=footer).
> > 
> > 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 a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe](https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe).  
> > To unsubscribe from this group and all its topics, 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/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr)[https://groups.google.com/d/msgid/elasticsearch/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/AC721639-B741-4DBE-9572-59A5D674DE36%40pilato.fr?utm_medium=email&utm_source=footer).
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Andrew Coulton  
> Founder  
> inGenerator Ltd
> 
> Follow us on Twitter @inGenerator  
> Phone us on 0131 510 0271
> 
> ## inGenerator Ltd is a company registered in Scotland (no SC435161) with its registered office at 8 Craigleith Hill Row, Edinburgh EH4 2JX.
> 
> 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/CAN3TXFdZbm0nYcwKpK5wGtJgn-E-KhPFP4n6mb3cQg%2BpS99JDQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFdZbm0nYcwKpK5wGtJgn-E-KhPFP4n6mb3cQg%2BpS99JDQ%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAN3TXFdZbm0nYcwKpK5wGtJgn-E-KhPFP4n6mb3cQg%2BpS99JDQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFdZbm0nYcwKpK5wGtJgn-E-KhPFP4n6mb3cQg%2BpS99JDQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> 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 a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe](https://groups.google.com/d/topic/elasticsearch/M6XNjoYld2I/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/etPan.53295ceb.1ba026fa.97ca%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53295ceb.1ba026fa.97ca%40MacBook-Air-de-David.local)[https://groups.google.com/d/msgid/elasticsearch/etPan.53295ceb.1ba026fa.97ca%40MacBook-Air-de-David.local?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/etPan.53295ceb.1ba026fa.97ca%40MacBook-Air-de-David.local?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Andrew Coulton  
Founder  
inGenerator Ltd

Follow us on Twitter @inGenerator  
Phone us on 0131 510 0271

inGenerator Ltd is a company registered in Scotland (no SC435161) with its  
registered office at 8 Craigleith Hill Row, Edinburgh EH4 2JX.

--  
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/CAN3TXFcDu2dotS4fu%3DA%2BQ6gEaA6Hwi9ykQUdwmGDXuZSq0pSig%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAN3TXFcDu2dotS4fu%3DA%2BQ6gEaA6Hwi9ykQUdwmGDXuZSq0pSig%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:42am UTC](https://discuss.elastic.co/t/detecting-whether-elasticsearch-has-finished-indexing-after-adding-documents/16422/8 "2017-07-06T01:42:16Z")

</div>


