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
Post a Comment