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

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -