Skip to content

Instantly share code, notes, and snippets.

@jprante
Created December 10, 2012 10:20
Show Gist options
  • Save jprante/4249791 to your computer and use it in GitHub Desktop.
Save jprante/4249791 to your computer and use it in GitHub Desktop.
Versions
curl -XDELETE 'localhost:9200/test'
curl -XPUT 'localhost:9200/test/doc/1' -d '
{
"sentence" : "Hi 1!"
}
'
curl 'localhost:9200/test/_refresh'
curl -XPUT 'localhost:9200/test/doc/1' -d '
{
"sentence" : "Hi 2!"
}
'
curl 'localhost:9200/test/_refresh'
# getting different versions?
curl 'localhost:9200/test/doc/1?version=1&pretty'
curl 'localhost:9200/test/doc/1?version=2&pretty'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment