# Refresh parameter in reindex api

**URL:** <https://discuss.elastic.co/t/refresh-parameter-in-reindex-api/188552>\
**Category:** Elasticsearch\
**Created:** [July 2, 2019, 4:15pm UTC](https://discuss.elastic.co/t/refresh-parameter-in-reindex-api/188552 "2019-07-02T16:15:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zatom](https://avatars.discourse-cdn.com/v4/letter/z/f0a364/32.png) [@zatom](https://discuss.elastic.co/u/zatom)\
**Post date:** [July 2, 2019, 4:15pm UTC](https://discuss.elastic.co/t/refresh-parameter-in-reindex-api/188552/1 "2019-07-02T16:15:19Z")

</div>

Hi,

I want to understand what 'refresh' parameter do in reindex api, how it helps while reindexing huge index. Can you please clarify using examples how it is different from the 'refresh' used in Bulk Indexing. Following is the one where refresh is used in Bulk indexing:

PUT /twitter/\_settings  
{  
"index" : {  
"refresh\_interval" : "-1"  
}  
}

thank you

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 3, 2019, 8:41am UTC](https://discuss.elastic.co/t/refresh-parameter-in-reindex-api/188552/2 "2019-07-03T08:41:11Z")

</div>

Hey,

please format your messages when using code snippets. You can use markdown in here and it will greatly improve the ability to read your snippet - which will increase your changes of getting an answer.

The `refresh` parameter in the reindex API will ensure that every index your are reindexing into will be refreshed at the end of the reindex operation. See [https://www.elastic.co/guide/en/elasticsearch/reference/7.2/indices-refresh.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.2/indices-refresh.html)

This is similar when using refresh in the bulk API.

Your code snippet however contains the refresh interval, which is a different thing, as it configures how often a refresh should be executed in the background while new documents are indexed.

--Alex

---

<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 31, 2019, 8:41am UTC](https://discuss.elastic.co/t/refresh-parameter-in-reindex-api/188552/3 "2019-07-31T08:41:12Z")

</div>

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