Last active
June 17, 2020 03:18
-
-
Save ak1t0/310adca0d53a280c021c12fe06c24d9d to your computer and use it in GitHub Desktop.
Elasticsearch 日本語検索用スキーマ n-gram 形態素解析
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
{ | |
"settings": { | |
"analysis": { | |
"analyzer": { | |
"ja_ngram_analyzer": { | |
"tokenizer": "ja_ngram_tokenizer" | |
} | |
}, | |
"tokenizer": { | |
"ja_ngram_tokenizer": { | |
"type": "ngram", | |
"min_gram": 2, | |
"max_gram": 3, | |
"token_chars": [ | |
"letter", | |
"digit" | |
] | |
} | |
} | |
} | |
}, | |
"mappings": { | |
"docs":{ | |
"properties": { | |
"title": { | |
"type": "text", | |
"analyzer": "standard", | |
"fields": { | |
"ngram": { | |
"type": "text", | |
"analyzer": "ja_ngram_analyzer" | |
}, | |
"kuromoji": { | |
"type": "text", | |
"analyzer": "kuromoji" | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment