# Refresh parameter of Index API

**URL:** <https://discuss.elastic.co/t/refresh-parameter-of-index-api/59008>\
**Category:** Elasticsearch\
**Created:** [August 26, 2016, 6:43am UTC](https://discuss.elastic.co/t/refresh-parameter-of-index-api/59008 "2016-08-26T06:43:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kirill\_Teplinskiy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kirill_teplinskiy/32/1517_2.png) [@Kirill\_Teplinskiy](https://discuss.elastic.co/u/Kirill_Teplinskiy)\
**Post date:** [August 26, 2016, 6:43am UTC](https://discuss.elastic.co/t/refresh-parameter-of-index-api/59008/1 "2016-08-26T06:43:31Z")

</div>

Hello!

I found some inconsistency in the description of the `refresh` parameter of Index API:

- [elastic.co/guide v2.3](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-refresh) says it refreshes only the shard not the whole index.
- `<summary>` of the field [IndexDescriptor.Refresh](https://github.com/elastic/elasticsearch-net/blob/master/src/Nest/_Generated/_Descriptors.generated.cs#L1851) (NEST v2.4) says it refreshes the whole index
- [REST API spec v2.3.5](https://github.com/elastic/elasticsearch/blob/v2.3.5/rest-api-spec/src/main/resources/rest-api-spec/api/index.json#L42) says it refreshed the whole index

So does `refresh` parameter refresh the whole index on ES 2.3.5 or only the shard?

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [August 26, 2016, 8:19am UTC](https://discuss.elastic.co/t/refresh-parameter-of-index-api/59008/2 "2016-08-26T08:19:36Z")

</div>

Good catch. It refreshes only the shard.  
@Martijn_Laarman can you update the NEST docs?

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [August 26, 2016, 8:28am UTC](https://discuss.elastic.co/t/refresh-parameter-of-index-api/59008/3 "2016-08-26T08:28:44Z")

</div>

The REST API spec has been fixed in master:

> <https://github.com/elastic/elasticsearch/pull/17986>

---

<div class="post-metadata">

**Author:** ![Martijn\_Laarman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijn_laarman/32/4410_2.png) [@Martijn\_Laarman](https://discuss.elastic.co/u/Martijn_Laarman)\
**Post date:** [August 26, 2016, 11:05am UTC](https://discuss.elastic.co/t/refresh-parameter-of-index-api/59008/4 "2016-08-26T11:05:30Z")

</div>

That summarry is generated from the rest spec so we need to back port it to 2.x

@forloop or @gmarz can you guys take this while I'm on vacation? 🙂

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [August 29, 2016, 12:46am UTC](https://discuss.elastic.co/t/refresh-parameter-of-index-api/59008/5 "2016-08-29T00:46:09Z")

</div>

[submitted a PR for the rest api spec](https://github.com/elastic/elasticsearch/pull/20200) with [a patch of the description in NEST `2.x`.](https://github.com/elastic/elasticsearch-net/commit/51ffabe948313b08e255286428c789ed585b2a18)

---

<div class="post-metadata">

**Author:** ![Kirill\_Teplinskiy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kirill_teplinskiy/32/1517_2.png) [@Kirill\_Teplinskiy](https://discuss.elastic.co/u/Kirill_Teplinskiy)\
**Post date:** [August 29, 2016, 7:34am UTC](https://discuss.elastic.co/t/refresh-parameter-of-index-api/59008/6 "2016-08-29T07:34:06Z")

</div>

Thanks for the fix!

---

<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 5, 2017, 10:24pm UTC](https://discuss.elastic.co/t/refresh-parameter-of-index-api/59008/7 "2017-07-05T22:24:30Z")

</div>


