Skip to content

Instantly share code, notes, and snippets.

@kimchy
Created October 18, 2011 17:28
Show Gist options
  • Save kimchy/1296043 to your computer and use it in GitHub Desktop.
Save kimchy/1296043 to your computer and use it in GitHub Desktop.
curl -XPUT localhost:9200/test -d '{
"mappings" : {
"type1" : {
"properties" : {
"name" : {
"type" : "multi_field",
"fields" : {
"name" : {"type" : "string", "index" : "analyzed"},
"untouched" : {"type" : "string", "index" : "not_analyzed"}
}
}
}
}
}
}'
curl -XPUT localhost:9200/test/type1/1 -d '{
"name" : "test me"
}'
curl -XPOST localhost:9200/test/_refresh
curl -XGET localhost:9200/test/_search?q=name.untouched:*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment