Skip to content

Instantly share code, notes, and snippets.

@kennknowles
Created August 31, 2012 16:38
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 kennknowles/3555574 to your computer and use it in GitHub Desktop.
Save kennknowles/3555574 to your computer and use it in GitHub Desktop.
Analyzer after create
curl -XPOST localhost:9200/test
curl -XPOST localhost:9200/test/_close
curl -XPUT localhost:9200/test/_settings -d '{
"settings": {
"analysis" :{
"analyzer": {
"my_analyzer": {
"type": "custom",
"filter": [],
"tokenizer": "standard"}
}
}
}
}'
curl -XPOST localhost:9200/test/_open
curl -XPUT localhost:9200/test/type/_mapping -d '{
"type" : {
"properties" : {
"content": {
"type":"multi_field",
"fields":{
"raw_field" : {"type" : "string"},
"custom_field" : {"type" : "string", "analyzer":"my_analyzer"}
}
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment