Skip to content

Instantly share code, notes, and snippets.

@meddulla
Forked from ruflin/gist:1253270
Last active August 29, 2015 14:26
Show Gist options
  • Save meddulla/f03773df2fae22523e79 to your computer and use it in GitHub Desktop.
Save meddulla/f03773df2fae22523e79 to your computer and use it in GitHub Desktop.
Get has source
curl -XDELETE 'http://localhost:9200/test/'
curl -XPUT 'http://localhost:9200/test/'
curl -XPUT 'http://localhost:9200/test/test/_mapping' -d '{"test":{"properties":{"firstname":{"type":"string","store":"yes"},"lastname":{"type":"string", "store":"no"}},"_source":{"enabled":false}}}'
curl -XPOST 'http://localhost:9200/test/test' -d '{"firstname":"Nicolas","lastname":"ruflin"}'
curl -XPOST 'http://localhost:9200/test/test' -d '{"firstname":"Nicola","lastname":"ruflin"}'
#curl -XPOST 'http://localhost:9200/test/_flush'
curl -XGET 'http://localhost:9200/test/test/_search' -d '{"query":{"query_string":{"query":"ruflin"}},"fields":["*"]}'
sleep 2
curl -XGET 'http://localhost:9200/test/test/1?pretty=true'
curl -XGET 'http://localhost:9200/test/_search?q=*&pretty='
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment