Skip to content

Instantly share code, notes, and snippets.

@kimchy
Created May 13, 2012 12:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimchy/2688072 to your computer and use it in GitHub Desktop.
Save kimchy/2688072 to your computer and use it in GitHub Desktop.
curl -XDELETE localhost:9200/test
curl -XPUT localhost:9200/test -d '{
"mappings" : {
"demo" : {
"properties" : {
"demostring" : {
"type" : "string",
"analyzer" : "whitespace"
}
}
}
}
}'
curl -XPUT localhost:9200/test/demo/1 -d '{
"demostring" : "One/Two"
}'
curl -XPUT localhost:9200/test/demo/2 -d '{
"demostring" : "One Two"
}'
curl localhost:9200/test/_search -d '{
"query" : {
"match_all" : {}
},
"facets" : {
"demostring" : {
"terms" : {
"field" : "demostring"
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment