# Bulk index

**URL:** <https://discuss.elastic.co/t/bulk-index/87050>\
**Category:** Elasticsearch\
**Created:** [May 24, 2017, 10:16pm UTC](https://discuss.elastic.co/t/bulk-index/87050 "2017-05-24T22:16:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdaYang](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AdaYang](https://discuss.elastic.co/u/AdaYang)\
**Post date:** [May 24, 2017, 10:16pm UTC](https://discuss.elastic.co/t/bulk-index/87050/1 "2017-05-24T22:16:59Z")

</div>

I am still on ES 2.4. After bulk index is done,

1. update the following settings:  
{"number\_of\_replicas":1, "refresh\_interval":"30ms"} as I set refresh\_interval to 5s and number\_of\_replicas to 0 before indexing.
2. closed the new index
3. update this:  
"transient" : {  
"indices.store.throttle.type" : "merge"  
},
4. open the new index;
5. check the count of the new index. If the new count is ok comparing with the old count, I will switch the new index with the alias.

This was working.

But now I tried to set "refresh\_interval" to -1 before indexing;  
After bulk index is done, I refreshed the index: client.admin().indices().prepareRefresh().get() as I set refresh\_interval to -1;

but while I tried to get the count of the new index, it reported error:

RemoteTransportException[[Kehl of Tauran][127.0.0.1:9300][indices:data/read/search[phase/query]]]; nested: IndexNotFoundException[no such index];  
Caused by: [new\_index\_name] IndexNotFoundException[no such index]

...

[2017-05-24 14:52:22,766][INFO][cluster.routing.allocation] [Kehl of Tauran] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[new\_index\_name][0], [new\_index\_name][0], [new\_index\_name][1]] ...]).

Seems elasticsearch shards are not on the right status. What should be done in what order when refresh\_interval is set to -1?

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:** [June 21, 2017, 10:17pm UTC](https://discuss.elastic.co/t/bulk-index/87050/2 "2017-06-21T22:17:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
