Last active
August 29, 2015 14:02
-
-
Save renier/dc4344bd47d3e768011f to your computer and use it in GitHub Desktop.
Document is not available right away in elasticsearch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -x | |
curl -w "\n" -X DELETE http://localhost:9200/testing; | |
curl -w "\n" -X POST http://localhost:9200/testing/group -d '{"name":"default","description":"This is the default group.","id":null}'; | |
# This next request returns 0 hits | |
curl -w "\n" -X GET http://localhost:9200/testing/group/_search; | |
sleep 1; | |
# After waiting one second, this request returns the previously created document | |
curl -w "\n" -X GET http://localhost:9200/testing/group/_search; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Answer: pass refresh=true on the post to fix.