Elastic search data pull endpoint data availibility issue

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,



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'




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.


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

As explained in this blog post 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.

@Christian_Dahlqvist Thank you the response

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