# Elastic search data pull endpoint data availibility issue

**URL:** <https://discuss.elastic.co/t/elastic-search-data-pull-endpoint-data-availibility-issue/164108>\
**Category:** Elasticsearch\
**Created:** [January 14, 2019, 8:16am UTC](https://discuss.elastic.co/t/elastic-search-data-pull-endpoint-data-availibility-issue/164108 "2019-01-14T08:16:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Irti](https://avatars.discourse-cdn.com/v4/letter/i/aeb1de/32.png) [@Irti](https://discuss.elastic.co/u/Irti)\
**Post date:** [January 14, 2019, 8:16am UTC](https://discuss.elastic.co/t/elastic-search-data-pull-endpoint-data-availibility-issue/164108/1 "2019-01-14T08:16:17Z")

</div>

Hello everyone,

I have deployed elastic search on a ubuntu machine, I am making curl calls to push and pull the data back using these calls,

**LOGS**

**Request**

curl -X POST "localhost:9200/twitter1/\_doc/1" -H 'Content-Type: application/json' -d'  
{  
"user" : "kimchy",  
"post\_date" : "2009-11-15T14:12:12",  
"message" : "trying out Elasticsearch"  
}  
' **&&** curl -X GET "localhost:9200/twitter1/\_search" -H 'Content-Type: application/json'

**Response**

{"\_index":"twitter1","\_type":"\_doc","\_id":"1","\_version":1,"result":"created","\_shards":{"total":2,"successful":1,"failed":0},"\_seq\_no":0,"\_primary\_term":1}

{"took":53,"timed\_out":false,"\_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}

As you can see above the although the data has been inserted in the document in first curl call and when I try to pull the data back in the first request I didn't get data but in the second call I get data.

**Question**

- Isn't the POST call a blocking call?
- Why the data is not immediately available?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 14, 2019, 8:20am UTC](https://discuss.elastic.co/t/elastic-search-data-pull-endpoint-data-availibility-issue/164108/2 "2019-01-14T08:20:46Z")

</div>

As explained in [this blog post](https://www.elastic.co/blog/refreshing_news) documents are made searchable periodically. You may therefore need to wait up to the refresh interval (default 1 second) to be able to search for the new data.

---

<div class="post-metadata">

**Author:** ![Irti](https://avatars.discourse-cdn.com/v4/letter/i/aeb1de/32.png) [@Irti](https://discuss.elastic.co/u/Irti)\
**Post date:** [January 14, 2019, 12:16pm UTC](https://discuss.elastic.co/t/elastic-search-data-pull-endpoint-data-availibility-issue/164108/3 "2019-01-14T12:16:48Z")

</div>

@Christian_Dahlqvist Thank you the response

---

<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:** [February 11, 2019, 12:16pm UTC](https://discuss.elastic.co/t/elastic-search-data-pull-endpoint-data-availibility-issue/164108/4 "2019-02-11T12:16:57Z")

</div>

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