analysis.yml 4.14 KB
index:
  analysis:
    tokenizer:
      my_pinyin:
        type: pinyin
        first_letter: prefix
        padding_char: ''
      pinyin_first_letter:
        type: pinyin
        first_letter: only
      simple_pinyin:
        type: pinyin
        first_letter: none
        padding_char: ''
      semicolon_spliter:
        type: pattern
        pattern: ";"
      pct_spliter:
        type: pattern
        pattern: "[%]+"
      ngram_1_to_2:
        type: nGram
        min_gram: 1
        max_gram: 2
      ngram_1_to_3:
        type: nGram
        min_gram: 1
        max_gram: 3
      ik_smart_custom:
       type: ik_smart,
       use_smart: true,
       dict_db_enable: true,
       dict_db_log_enable:true,
       dict_db_url: jdbc:mysql://192.168.102.216:3306/yhb_search_dev?user=yh_test&password=9nm0icOwt6bMHjMusIfMLw==&useUnicode=true&characterEncoding=UTF8
     filter:
      ngram_min_3:
        max_gram: 10
        min_gram: 3
        type: nGram
      ngram_min_2:
        max_gram: 10
        min_gram: 2
        type: nGram
      ngram_min_1:
        max_gram: 10
        min_gram: 1
        type: nGram
      min2_length:
        min: 2
        max: 4
        type: length
      min3_length:
        min: 3
        max: 4
        type: length
      pinyin_first_letter:
        type: pinyin
        first_letter: only
      my_stop:
        type: stop
        stopwords_path: custom/stopwords.txt
      my_synonym:
        type: synonym
        synonyms_path: custom/synonyms.dic
      dynamic_synonym:
        type:dynamic-synonym
        synonym_expand:true
        synonym_ignore_case:true
        synonym_analyzer:ik_smart
        synonym_db_dict_url:jdbc:mysql://192.168.102.216:3306/yhb_search_dev?user=yh_test&password=9nm0icOwt6bMHjMusIfMLw==&useUnicode=true&characterEncoding=UTF8
      dynamic_synonym_rewrite:
        type:dynamic-synonym-rewrite
        synonym_expand:true
        synonym_ignore_case:true
        synonym_analyzer:ik_smart
        synonym_db_dict_url:jdbc:mysql://192.168.102.216:3306/yhb_search_dev?user=yh_test&password=9nm0icOwt6bMHjMusIfMLw==&useUnicode=true&characterEncoding=UTF8
    analyzer:
      lowercase_standard:
        type: custom
        filter:
        - lowercase
        tokenizer: standard
      lowercase_keyword:
        type: custom
        filter:
        - lowercase
        tokenizer: keyword
      lowercase_whitespace:
        type: custom
        filter:
        - lowercase
        tokenizer: whitespace
      lowercase_keyword_ngram:
        type: custom
        filter:
        - lowercase
        - stop
        - trim
        - unique
        tokenizer: ngram_1_to_3
      ik_max_word:
        type: ik
        use_smart: false
      ik_max_word_syno:
        type: custom
        tokenizer: ik
        filter: [my_synonym]
        use_smart: false
      ik_smart:
        type: ik
        use_smart: true
      ik_complex:
        type: custom
        tokenizer: ik_smart_custom
        filter:
        - lowercase
        - dynamic_synonym
        - my_stop
        - lowercase
        - unique
      ik_complex_search:
        type: custom
        tokenizer: ik_smart
        filter:
        - lowercase
        - dynamic_synonym_rewrite
        - my_stop
        - lowercase
        - unique
      comma_spliter:
        type: pattern
        pattern: "[,|\\s]+"
      pinyin_analyzer:
        type: custom
        tokenizer: simple_pinyin
        filter:
        - standard
        - word_delimiter
        - lowercase
        - trim
        - unique
      pinyin_first_letter_keyword_analyzer:
        alias:
        - pinyin_first_letter_analyzer_keyword
        type: custom
        tokenizer: keyword
        filter:
        - pinyin_first_letter
        - lowercase
        
index.analysis.analyzer.default.type: keyword
index.search.slowlog.level: TRACE
index.search.slowlog.threshold.query.warn: 1s
index.search.slowlog.threshold.query.info: 800ms
index.search.slowlog.threshold.query.debug: 500ms
index.search.slowlog.threshold.query.trace: 200ms
index.search.slowlog.threshold.fetch.warn: 1s
index.search.slowlog.threshold.fetch.info: 800ms
index.search.slowlog.threshold.fetch.debug: 500ms
index.search.slowlog.threshold.fetch.trace: 200ms