Skip to content

Instantly share code, notes, and snippets.

@dadoonet
Created June 14, 2013 15:38
Show Gist options
  • Save dadoonet/5782816 to your computer and use it in GitHub Desktop.
Save dadoonet/5782816 to your computer and use it in GitHub Desktop.
Testing delete and recreate issue
echo "clean index"
curl -XDELETE 'http://localhost:9200/test?pretty' ; echo
echo "PUT Tweet"
curl -XPUT 'http://localhost:9200/test/tweet/1?pretty' -d '
{
"myfield": "Hello world"
}
' ; echo
# Refresh docs
echo "Refresh index"
curl -XPOST 'http://localhost:9200/test/_refresh' ; echo
echo "Search"
curl -XGET 'http://localhost:9200/test/tweet/_count?pretty' ; echo
echo "DELETE Tweet"
curl -XDELETE 'http://localhost:9200/test/tweet/1?pretty' ; echo
# Refresh docs
echo "Refresh index"
curl -XPOST 'http://localhost:9200/test/_refresh' ; echo
echo "Search"
curl -XGET 'http://localhost:9200/test/tweet/_count?pretty' ; echo
echo "PUT Tweet"
curl -XPUT 'http://localhost:9200/test/tweet/1?pretty' -d '
{
"myfield": "Hello world"
}
' ; echo
# Refresh docs
echo "Refresh index"
curl -XPOST 'http://localhost:9200/test/_refresh' ; echo
echo "Search"
curl -XGET 'http://localhost:9200/test/tweet/_count?pretty' ; echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment