Configuration for elasticsearch

create two directory: /config/mmseg, /plugins/analysis-mmseg

  1. go to https://github.com/medcl/elasticsearch-rtf/tree/master/config/mmseg, download the files:
    chars.dic, units.dic, words-my.dic and words.dic, move them to /config/mmseg

  2. go to https://github.com/medcl/elasticsearch-rtf/tree/master/plugins/analysis-mmseg, download the jar:
    elasticsearch-analysis-mmseg-1.2.2.jar, move 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
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容