Skip to content

Instantly share code, notes, and snippets.

@tomoemon
Last active August 29, 2015 14:11
Show Gist options
  • Save tomoemon/16e2b593cc029a470534 to your computer and use it in GitHub Desktop.
Save tomoemon/16e2b593cc029a470534 to your computer and use it in GitHub Desktop.
Elasticsearch test script
curl -XPUT localhost:9200/group -d '{
"mappings": {
"person": {
"properties": {
"name": {
"type": "string"
}
}
}
}
}'
curl -XPUT localhost:9200/group/person/1 -d '{
"name": "Lady GaGa"
}'
curl -XPUT localhost:9200/group/person/2 -d '{
"name": "Thomas Jeffrey"
}'
curl -XPUT localhost:9200/group/person/3 -d '{
"name": "Paul Thomas Mann"
}'
curl -XPOST localhost:9200/group/person/_search -d '{
"query" : {
"match" : {
"name" : "Thomas"
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment