Skip to content

Instantly share code, notes, and snippets.

@ise
Created January 16, 2015 01:31
Show Gist options
  • Save ise/ca67e218b7d7bdaea8a5 to your computer and use it in GitHub Desktop.
Save ise/ca67e218b7d7bdaea8a5 to your computer and use it in GitHub Desktop.
Elasticsearchのkuromoji_analyzer設定サンプル
PUT /test-index/
{
"settings": {
"index":{
"analysis": {
"filter": {
"pos_filter": {
"type": "kuromoji_part_of_speech",
"stoptags": [
"助詞-格助詞-一般",
"助詞-終助詞"
]
},
"greek_lowercase_filter": {
"type": "lowercase",
"language": "greek"
}
},
"tokenizer": {
"kuromoji": {
"type": "kuromoji_tokenizer"
},
"ngram_tokenizer": {
"type": "nGram",
"min_gram": "2",
"max_gram": "3",
"token_chars": [
"letter",
"digit"
]
}
},
"analyzer": {
"kuromoji_analyzer": {
"type": "custom",
"tokenizer": "kuromoji_tokenizer",
"filter": [
"kuromoji_baseform",
"pos_filter",
"greek_lowercase_filter",
"cjk_width"
]
},
"ngram_analyzer": {
"tokenizer": "ngram_tokenizer"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment