elasticsearch-cn-out-of-box
elasticsearch-cn-out-of-box
https://github.com/hangxin1940/elasticsearch-cn-out-of-box
为elasticsearch集成一些实用插件以及配置的开箱即用的版本。
======
- elasticsearch 1.4.2
 - servicewrapper 0.90
 
站点插件:
- oob
 - bigdesk 2.5.0
 - head
 - kopf 1.2.5
 - segmentspy
 - inquisitor
 - paramedic
 - hq
 
分词插件
- analysis-smartcn 2.3.1
 - analysis-mmseg 1.2.2
 - analysis-ik 1.2.9
 - analysis-stconvert 1.3.0
 - analysis-pinyin 1.2.2
 - analysis-ansj 1.x.1
 - analysis-string2int 1.3.0
 - analysis-combo 1.5.1
 
其他插件
- jetty oob-1.4.2
 - mapper-attachments 2.4.1
 
为 inquisitor 插件增加自定义分析器的预览等

使用方法
浏览器进入插件 http://localhost:9200/_plugin/oob


elasticsearch.yml
# 集群名
cluster.name: "cn-out-of-box"
# 节点名
node.name: "node1"
# 是否有资格成为主节点
node.master: true
# 是否存储索引数据
node.data: true
# 默认索引分片数
index.number_of_shards: 3
# 默认索引副本数
index.number_of_replicas: 1
# 临时文件存储路路径
#path.work: "/tmp/elasticsearch"
# 日志文件存储路路径
#path.logs:  "/var/log/elasticsearch/logs"
# tcp传输端口
transport.tcp.port: 9300
# 是否压缩tcp传输数据
transport.tcp.compress: true
# http端口
http.port: 9200
# 是否开启http服务
#http.enabled: true
# 是否打开多播发现节点
discovery.zen.ping.multicast.enabled: true
# 慢查询日志参数
#index.search.slowlog.threshold.query.warn: 10s
#index.search.slowlog.threshold.query.info: 5s
#index.search.slowlog.threshold.query.debug: 2s
#index.search.slowlog.threshold.query.trace: 500ms
#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
# 启用jetty插件提供http服务
http.type: com.sonian.elasticsearch.http.jetty.JettyHttpServerTransport
# sonian.elasticsearch.http.jetty:
    # ==== 开启 https
    #ssl_port: 9443
    #config: jetty.xml,jetty-ssl.xml, jetty-gzip.xml
    #keystore_password: "OBF:1nc01vuz1w8f1w1c1rbu1rac1w261w9b1vub1ndq"
    # ==== 开启用户认证
    # config: jetty.xml,jetty-hash-auth.xml,jetty-restrict-all.xml
# 索引配置
index:
  # 分析配置
  analysis:
    # 分词器配置
    tokenizer:
      index_ansj_token:
        type: ansj_index_token
        is_name: false
        is_num: false
        is_quantifier: false
      query_ansj_token:
        type: ansj_query_token
        is_name: false
        is_num: false
        is_quantifier: false
# ======== analysis-pinyin ========
      # 完整拼音
      my_pinyin:
        type: pinyin
        first_letter: prefix
        padding_char: ' '
      # 拼音首字母
      pinyin_first_letter:
        type: pinyin
        first_letter: only
# ======== analysis-mmseg ========
      # 简单正向匹配
      #       example: 一个劲儿的说话
      #       一个
      #       一个劲
      #       一个劲儿
      #       一个劲儿的
      mmseg_simple:
        type: mmseg
        seg_type: simple
      # 匹配出所有的“三个词的词组”
      # 并使用四种规则消歧(最大匹配、最大平均词语长度、词语长度的最小变化率、所有单字词词频的自然对数之和)
      #       example: 研究生命起源
      #       研_究_生
      #       研_究_生命
      #       研究生_命_起源
      #       研究_生命_起源
      mmseg_complex:
        type: mmseg
        seg_type: complex
      # 基于complex的最多分词
      #       example: 中国人民银行
      #       中国|人民|银行
      mmseg_maxword:
        type: mmseg
        seg_type: max_word
# ======== analysis-stconvert ========
      # 简繁转换,只输出繁体
      s2t_convert:
        type: stconvert
        delimiter: ","
        convert_type: s2t
     # 繁简转换,只输出简体
      t2s_convert:
        type: stconvert
        delimiter: ","
        convert_type: t2s
     # 简繁转换,同时输出繁体简体
      s2t_keep_both_convert:
        type: stconvert
        delimiter: ","
        keep_both: 'true'
        convert_type: s2t
     # 繁简转换,同时输出简体繁体
      t2s_keep_both_convert:
        type: stconvert
        delimiter: ","
        keep_both: 'true'
        convert_type: t2s
# ======== analysis-pattern ========
     # 正则,分号分词
      semicolon_spliter:
        type: pattern
        pattern: ";"
     # 正则,%分词
      pct_spliter:
        type: pattern
        pattern: "[%]+"
 # ======== analysis-nGram ========
      # 1~2字为一词
      ngram_1_to_2:
        type: nGram
        min_gram: 1
        max_gram: 2
      # 1~3字为一词
      ngram_1_to_3:
        type: nGram
        min_gram: 1
        max_gram: 3
    # 过滤器配置
    filter:
 # ======== ngram 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
 # ======== length filter ========
      min2_length:
        min: 2
        max: 4
        type: length
      min3_length:
        min: 3
        max: 4
        type: length
 # ======== string2int filter ========
#      my_string2int:
#        type: string2int
#        redis_server: 127.0.0.1
#        redis_port: 6379
#        redis_key: index1_type2_name2
 # ======== pinyin filter ========
      pinyin_first_letter:
        type: pinyin
        first_letter: only
    # 分析器配置
    analyzer:
      lowercase_keyword:
        type: custom
        filter:
        - lowercase
        tokenizer: standard
      lowercase_keyword_ngram_min_size1:
        type: custom
        filter:
        - lowercase
        - stop
        - trim
        - unique
        tokenizer: nGram
      lowercase_keyword_ngram_min_size2:
        type: custom
        filter:
        - lowercase
        - min2_length
        - stop
        - trim
        - unique
        tokenizer: nGram
      lowercase_keyword_ngram_min_size3:
        type: custom
        filter:
        - lowercase
        - min3_length
        - stop
        - trim
        - unique
        tokenizer: ngram_1_to_3
      lowercase_keyword_ngram:
        type: custom
        filter:
        - lowercase
        - stop
        - trim
        - unique
        tokenizer: ngram_1_to_3
      lowercase_keyword_without_standard:
        type: custom
        filter:
        - lowercase
        tokenizer: keyword
      lowercase_whitespace:
        type: custom
        filter:
        - lowercase
        tokenizer: whitespace
 # ======== ik  ========
       # ik分词器
      ik:
        alias:
        - ik_analyzer
        type: org.elasticsearch.index.analysis.IkAnalyzerProvider
      # ik智能切分
      ik_max_word:
        type: ik
        use_smart: false
      # ik最细粒度切分
      ik_smart:
        type: ik
        use_smart: true
 # ======== mmseg  ========
       # mmseg分词器
      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
 # ======== 正则 ========
      comma_spliter:
        type: pattern
        pattern: "[,|\\s]+"
      pct_spliter:
        type: pattern
        pattern: "[%]+"
      custom_snowball_analyzer:
        type: snowball
        language: English
      simple_english_analyzer:
        type: custome
        tokenizer: whitespace
        filter:
        - standard
        - lowercase
        - snowball
      edge_ngram:
        type: custom
        tokenizer: edgeNGram
        filter:
        - lowercase
  # ======== 拼音分析 ========
      pinyin_ngram_analyzer:
        type: custom
        tokenizer: my_pinyin
        filter:
        - lowercase
        - nGram
        - trim
        - unique
  # ======== 拼音首字母分词 ========
      pinyin_first_letter_analyzer:
        type: custom
        tokenizer: pinyin_first_letter
        filter:
        - standard
        - lowercase
   # ======== 拼音首字母分词并过滤 ========
      pinyin_first_letter_keyword_analyzer:
        alias:
        - pinyin_first_letter_analyzer_keyword
        type: custom
        tokenizer: keyword
        filter:
        - pinyin_first_letter
        - lowercase
   # ======== 简繁体 ========
      stconvert:
        alias:
        - st_analyzer
        type: org.elasticsearch.index.analysis.STConvertAnalyzerProvider
      s2t_convert:
        type: stconvert
        delimiter: ","
        convert_type: s2t
      t2s_convert:
        type: stconvert
        delimiter: ","
        convert_type: t2s
      s2t_keep_both_convert:
        type: stconvert
        delimiter: ","
        keep_both: 'true'
        convert_type: s2t
      t2s_keep_both_convert:
        type: stconvert
        delimiter: ","
        keep_both: 'true'
        convert_type: t2s
      #string2int:
        #type: org.elasticsearch.index.analysis.String2IntAnalyzerProvider
        # redis_server: 127.0.0.1
        # redis_port: 6379
        # redis_key: index1_type1_name1
      #custom_string2int:
        #type: custom
        #tokenizer: whitespace
        #filter:
        #- string2int
        #- lowercase
      # 路径分析
      path_analyzer:
        type: custom
        tokenizer: path_hierarchy
# ======== ansj ========
      index_ansj:
        alias:
        - ansj_index_analyzer
        type: ansj_index
        user_path: ansj/user
        ambiguity: ansj/ambiguity.dic
        stop_path: ansj/stopLibrary.dic
        #is_name: false
        # s_num: true
        #is_quantifier: true
        redis: false
          #pool:
            #maxactive: 20
           # maxidle: 10
            #maxwait: 100
            #testonborrow: true
          #ip: 127.0.0.1:6379
          #channel: ansj_term
      query_ansj:
        alias:
        - ansj_query_analyzer
        type: ansj_query
        user_path: ansj/user
        ambiguity: ansj/ambiguity.dic
        stop_path: ansj/stopLibrary.dic
        #is_name: false
        # is_num: true
        # is_quantifier: true
        redis: false
          #pool:
            #maxactive: 20
           # maxidle: 10
            #maxwait: 100
            #testonborrow: true
          #ip: 127.0.0.1:6379
          #channel: ansj_term
      uax_url_email:
        tokenizer: uax_url_email
        filter: [standard, lowercase, stop] 
 # ======== combo ========
      combo:
        type: combo
        sub_analyzers:
         - ansj_index
         - ik_smart
         - mmseg_complex
         - uax_url_email
         - s2t_convert
         - t2s_convert
         - smartcn
         - simple_english_analyzer
# 默认分析器
index.analysis.analyzer.default.type: combo
# 线程池设置
threadpool:
    index:
        type: fixed
        size: 30
        queue: -1
        reject_policy: caller  
												
											elasticsearch-cn-out-of-box的更多相关文章
- Query DSL for elasticsearch Query
		
Query DSL Query DSL (资料来自: http://www.elasticsearch.cn/guide/reference/query-dsl/) http://elasticsea ...
 - 可以执行全文搜索的原因 Elasticsearch full-text search  Kibana  RESTful API with JSON over HTTP  elasticsearch_action  es 模糊查询
		
https://www.elastic.co/guide/en/elasticsearch/guide/current/getting-started.html Elasticsearch is a ...
 - 搜索引擎 ElasticSearch 之 步步为营 【主目录】
		
ElasticSearch 是一款著名的分布式搜索引擎框架,采用Java编写.具有搜索速度快,实时搜索等特色. 以下为官网对ElasticSearch的介绍: Elasticsearch 是一款高可伸 ...
 - 【elasticsearch】python下的使用
		
有用链接: 最有用的:http://es.xiaoleilu.com/054_Query_DSL/70_Important_clauses.html 不错的博客:http://www.cnblogs. ...
 - ElasticSearch学习笔记-01 简介、安装、配置与核心概念
		
一.简介 ElasticSearch是一个基于Lucene构建的开源,分布式,RESTful搜索引擎.设计用于云计算中,能够达到实时搜索,稳定,可靠,快速,安装使用方便.支持通过HTTP使用JSON进 ...
 - ElasticSearch实战使用
		
注意:以下命令都是使用sense测试(ElasticSearch第二步-CRUD之Sense),且数据都已经使用过IK分词. 以下测试数据来源于文档(db_test/person) 需要注意的是下面的 ...
 - Elasticsearch和mysql数据同步(elasticsearch-jdbc)
		
1.介绍 对mysql.oracle等数据库数据进行同步到ES有三种做法:一个是通过elasticsearch提供的API进行增删改查,一个就是通过中间件进行数据全量.增量的数据同步,另一个是通过收集 ...
 - laravel Scout包在elasticsearch中的应用
		
laravel Scout包在elasticsearch中的应用 laravel的Scout包是针对自身的Eloquent模型开发的基于驱动的全文检索引擎.意思就是我们可以像使用ORM一样使用检索功能 ...
 - 搜索引擎solr和elasticsearch
		
刚开始接触搜索引擎,网上收集了一些资料,在这里整理了一下分享给大家. 一.关于搜索引擎 搜索引擎(Search Engine)是指根据一定的策略.运用特定的计算机程序从互联网上搜集信息,在对信息进行组 ...
 - 【转】Elasticsearch学习
		
原作者:铭毅天下,原文地址:blog.csdn.net/laoyang360 https://blog.csdn.net/wojiushiwo987/article/details/52244917 ...
 
随机推荐
- C++ set使用
			
C++ set使用 实际上c++ STL中的set是的实现和C++ STL中的map的实现的底层数据结构是一样的,如果我们不在考虑红黑树中的卫星数据,而只是关键字,那么同样不允许key值得重复,那么就 ...
 - Young氏矩阵
			
一个 m x n 的Young氏矩阵是指,每一行数据都是从左到右排好序,每一列的数据也都是从上到下排好序.其中也可能存在一些INF的数据,表示不存在的元素,一个mxn的Young氏矩阵最多用来存放 r ...
 - struts2--表单重复提交
			
1.表单重复提交: --使用struts2的Token或TokenSession拦截器避免重复提交: > 上述两个拦截器均不在默认的拦截器栈中,需要在struts.xml中配置: > To ...
 - 数据库知识整理<四>
			
使用DML语句更改数据: 所谓DML语句是指数据库操作语句,其中包括的是对数据库数据的修改.删除.插入. 4.1添加新数据: 插入单行的记录:基本的SQL语句为-insert into <表明& ...
 - 【概念笔记】 EL表达式
			
一.EL简介 1.语法结构 ${expression} 2.[]与.运算符 EL 提供.和[]两种运算符来存取数据. 当要存取的属性名称中包含一些特殊字符,如.或?等并非字母或数字的符号,就一定要 ...
 - 分享MYSQL中的各种高可用技术(源自姜承尧大牛)
			
分享MYSQL中的各种高可用技术(源自姜承尧大牛) 图片和资料来源于MYSQL大牛姜承尧老师(MYSQL技术内幕作者) 姜承尧: 网易杭州研究院 技术经理 主导INNOSQL的开发 mysql高可用各 ...
 - 【Win10】解决 模拟器调试手机 错误-> 引导阶段...  无法找到指定路径......\2052\msdbgui.dll
			
去弄几天的Web服务,又弄了几天的CefSharp,都是给其它组的同学做了一下支持,终于又可以回来玩下Win10啦. 今天想试一下UWP在手机上的效果,就找了台WP手机开始升级,结果下载速度遥遥无期, ...
 - .NET Core竟然无法在Mac下进行build
			
KRuntime 改为 XRE 之后(详见从 KRE 到 XRE :ASP.NET 5 中正在消失的那些K),昨天在 mac 用 git 签出 XRE 的代码库,直接执行其中的 build 命令 sh ...
 - Openstack Murano(kilo)二次开发之添加Volume
			
Openstack Murano(kilo)二次开发之添加Volume 欢迎转载,转载请注明出处:http://www.cnblogs.com/fmnisme/p/openstack_murano_a ...
 - NPM小结
			
nodejs的出现,可以算是前端里程碑式的一个事件,它让前端攻城狮们摆脱了浏览器的束缚,踏上了一个更加宽广的舞台.前端的可能性,从此更加具有想象空间. 随着一系列基于nodes的应用/工具的出现,工作 ...