Skip to content

Instantly share code, notes, and snippets.

@alejandrodumas
Forked from kimchy/gist:2437609
Created April 27, 2012 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alejandrodumas/2512894 to your computer and use it in GitHub Desktop.
Save alejandrodumas/2512894 to your computer and use it in GitHub Desktop.
curl -XPUT localhost:9200/test -d '
{"settings": {
"analysis" :{
"analyzer": {
"exact_analyzer": {
"type": "custom",
"tokenizer":"my_pattern_tokenizer",
"filter":[]
}
},
"tokenizer": {
"my_pattern_tokenizer": {
"type":"pattern",
"pattern":"$^"
}
},
"filter": {
}
}
}
}
'
curl -XPUT localhost:9200/test/type/_mapping -d '{
"type" : {
"properties" : {
"category": {
"type":"multi_field",
"fields":{
"category" : {"type" : "string"},
"exactCategory" : {"type" : "string", "store": "yes", "analyzer":"exact_analyzer"}
}
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment