# How to call \_refresh

**URL:** <https://discuss.elastic.co/t/how-to-call--refresh/55529>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [July 14, 2016, 1:50pm UTC](https://discuss.elastic.co/t/how-to-call--refresh/55529 "2016-07-14T13:50:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jspooner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jspooner/32/12984_2.png) [@jspooner](https://discuss.elastic.co/u/jspooner)\
**Post date:** [July 14, 2016, 1:50pm UTC](https://discuss.elastic.co/t/how-to-call--refresh/55529/1 "2016-07-14T13:50:23Z")

</div>

I'm using the parent child relationship in elastic search and I believe I need to call \_refresh before bulk loading the child documents.

I currently have this code that works fine with a small test dataset, however when processing the real data set it's not loading the child documents. Is there a way to call the \_refresh method via EsSpark?

```
EsSpark.saveToEsWithMeta( parentRDD, "myindex/parent")
EsSpark.saveToEsWithMeta( childRDD, "myindex/child")
```

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [July 19, 2016, 4:19am UTC](https://discuss.elastic.co/t/how-to-call--refresh/55529/2 "2016-07-19T04:19:03Z")

</div>

Hello there!

> [@jspooner](#):
>
> I'm using the parent child relationship in Elasticsearch and I believe I need to call \_refresh before bulk loading the child documents.

You can index child documents without having any parents present. You'll only see a change in search results in this case as they won't have parents yet, but the parents can be added at any time afterward.

> [@jspooner](#):
>
> Is there a way to call the \_refresh method via EsSpark?

[There is a configuration property](https://www.elastic.co/guide/en/elasticsearch/hadoop/current/configuration.html#configuration-serialization) that controls how the `_refresh` endpoint is called during the job. It's on by default which means that the connector should be calling that end point for you already.

It's possible that something else is amiss?

---

<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:23pm UTC](https://discuss.elastic.co/t/how-to-call--refresh/55529/3 "2017-07-06T13:23:55Z")

</div>


