Created
August 31, 2012 16:37
-
-
Save kennknowles/3555567 to your computer and use it in GitHub Desktop.
Analyzer on index creation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPOST localhost:9200/test/ -d '{ | |
"settings": { | |
"analysis" :{ | |
"analyzer": { | |
"my_analyzer": { | |
"type": "custom", | |
"filter": [], | |
"tokenizer": "standard"} | |
} | |
} | |
} | |
}' | |
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