Skip to content

Instantly share code, notes, and snippets.

@ruflin
Created September 30, 2011 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ruflin/1253270 to your computer and use it in GitHub Desktop.
Save ruflin/1253270 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 -XPUT 'http://localhost:9200/test/test/1' -d '
{"firstname":"Nicolas","lastname":"Ruflin"}'
curl -XGET 'http://localhost:9200/test/test/_search' -d '
{"query":{"query_string":{"query":"ruflin"}},"fields":["*"]}'
curl -XGET 'http://localhost:9200/test/test/1?pretty=true'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment