- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/huaban/elasticsearch-analysis-jieba
- 软件文档: https://github.com/huaban/elasticsearch-analysis-jieba
- 官方下载: https://github.com/huaban/elasticsearch-analysis-jieba
软件介绍
结巴分词插件(for elasticsearch),目前支持0.90.*以上版本
---------------------------------------------------- | Jieba Chinese Analysis Plugin | ElasticSearch | ---------------------------------------------------- | 0.0.1-SNAPSHOT (master) | 0.90.* | ----------------------------------------------------
支持两种分词模式(seg_mode):
- index 索引模式,搜索引擎建立索引阶段使用该模式
- search 搜索模式,搜索时采用该种模式分词
使用说明
创建mapping
#!/bin/bash curl -XDELETE '0:9200/test/';echo curl -XPUT '0:9200/test/' -d ' { "index" : { "number_of_shards": 1, "number_of_replicas": 0, "analysis" : { "analyzer" : { "jieba_search" : { "type" : "jieba", "seg_mode" : "search", "stop" : true }, "jieba_index" : { "type" : "jieba", "seg_mode" : "index", "stop" : true } } } } }';echo
test
# index mode curl '0:9200/test/_analyze?analyzer=jieba_index' -d '中华人民共和国';echo
结果:
{ "tokens": [ { "token": "中华", "start_offset": 0, "end_offset": 2, "type": "word", "position": 1 }, { "token": "华人", "start_offset": 1, "end_offset": 3, "type": "word", "position": 2 }, { "token": "人民", "start_offset": 2, "end_offset": 4, "type": "word", "position": 3 }, { "token": "共和", "start_offset": 4, "end_offset": 6, "type": "word", "position": 4 }, { "token": "共和国", "start_offset": 4, "end_offset": 7, "type": "word", "position": 5 }, { "token": "中华人民共和国", "start_offset": 0, "end_offset": 7, "type": "word", "position": 6 } ] }
# search mode curl '0:9200/test/_analyze?analyzer=jieba_search' -d '中华人民共和国';echo
结果:
{ "tokens": [ { "token": "中华人民共和国", "start_offset": 0, "end_offset": 7, "type": "word", "position": 1 } ] }
新零售:低价高效的数据赋能之路
刘润 / 中信出版集团 / 2018-9 / 65.00元
小米新零售,如何做到20倍坪效? 天猫小店,如何利用大数据助力线下零售? 盒马鲜生,为什么坚持必须用App才能买单? 名创优品,实体小店在电商冲击下,如何拥抱春天? 新零售的未来在何方?什么样的思维模式才可应对? 新零售,不是商界大佬的专用名词,它就在我们生活触手可及的各个角落——小到便利店的酸奶,大到京东商城的冰箱,都蕴含着消费者、货物、经营场所三者共同作用的经济逻......一起来看看 《新零售:低价高效的数据赋能之路》 这本书的介绍吧!
