Last active
August 29, 2015 14:05
-
-
Save tigerneil/e0779feeb1914a8199d1 to your computer and use it in GitHub Desktop.
elasticsearch.yml for mmseg
This file contains 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
create two directory: `/config/mmseg`, `/plugins/analysis-mmseg` | |
1. got to [`https://github.com/medcl/elasticsearch-rtf/tree/master/config/mmseg`](https://github.com/medcl/elasticsearch-rtf/tree/master/config/mmseg)`, download the files: | |
chars.dic, units.dic, words-my.dic,words.dic, mv them to `/config/mmseg` | |
2. go to [`https://github.com/medcl/elasticsearch-rtf/tree/master/plugins/analysis-mmseg`](https://github.com/medcl/elasticsearch-rtf/tree/master/plugins/analysis-mmseg), download the jar: | |
elasticsearch-analysis-mmseg-1.2.2.jar, mv them to `/plugins/analysis-mmseg` | |
3. add the following configuration to `elasticsearch.yml`: | |
index: | |
analysis: | |
tokenizer: | |
mmseg_maxword: | |
type: mmseg | |
seg_type: max_word | |
mmseg_complex: | |
type: mmseg | |
seg_type: complex | |
mmseg_simple: | |
type: mmseg | |
seg_type: simple | |
analyzer: | |
ik: | |
alias: | |
- ik_analyzer | |
type: org.elasticsearch.index.analysis.IkAnalyzerProvider | |
ik_max_word: | |
type: ik | |
use_smart: false | |
ik_smart: | |
type: ik | |
use_smart: true | |
mmseg: | |
alias: | |
- mmseg_analyzer | |
type: org.elasticsearch.index.analysis.MMsegAnalyzerProvider | |
mmseg_maxword: | |
type: custom | |
filter: | |
- lowercase | |
tokenizer: mmseg_maxword | |
mmseg_complex: | |
type: custom | |
filter: | |
- lowercase | |
tokenizer: mmseg_complex | |
mmseg_simple: | |
type: custom | |
filter: | |
- lowercase | |
tokenizer: mmseg_simple |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment