Skip to content

Instantly share code, notes, and snippets.

@kimchy
Created Oct 18, 2011
Embed
What would you like to do?
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