database - ElasticSearch asynchronous post -


i'm posting data on elasticsearch database.

i've noticed data not available, requires milliseconds show in request. can live (after all, calls asynchronous behavior expected) in test code need post data , after retrieve it. @ moment i'm using sleep(5) sure data available how can synchronize db?

to ensure data available, can make refresh request corresponding index before get/search:

http://localhost:9200/your_index/_refresh 

or refresh indexes:

http://localhost:9200/_refresh 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -