前提条件

elasticsearch使用版本5.6.3,需要jdk版本1.8,低于该版本不能使用

下载

https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.3.zip

启动

1、进入目录C:\test\es\elasticsearch-5.6.3\bin

2、点击elasticsearch.bat即可启动

验证

中文分词安装

1、进入目录C:\test\es\elasticsearch-5.6.3\bin

2、执行命令elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v5.6.3/elasticsearch-analysis-ik-5.6.3.zip

中文分词验证

1、创建分词索引库

curl -PUT http://localhost:9200/fenci_1/
{
"mappings": {
"mynames": {
"properties": {
"content": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
}
}
}
}
} 

2、搜索切词验证

ik_max_word

http://192.168.4.131:9201/fenci_1/_analyze?text=中华人民共和国MN&tokenizer=ik_max_word

ik_smart

http://localhost:9200/fenci_1/_analyze?text=中华人民共和国MN&tokenizer=ik_smart

3、添加索引数据

curl -XPOST http://localhost:9200/fenci_1/mynames/1 -d'
{"content":"美国留给伊拉克的是个烂摊子吗"}
'
curl -XPOST http://localhost:9200/fenci_1/mynames/2 -d'
{"content":"公安部:各地校车将享最高路权"}
'
curl -XPOST http://localhost:9200/fenci_1/mynames/3 -d'
{"content":"中韩渔警冲突调查:韩警平均每天扣1艘中国渔船"}
'
curl -XPOST http://localhost:9200/fenci_1/mynames/4 -d'
{"content":"中国驻洛杉矶领事馆遭亚裔男子枪击 嫌犯已自首"}
'

4、搜索

curl -XPOST http://localhost:9200/fenci_1/mynames/_search  -d'
{
"query" : { "match" : { "content" : "中国" }}
}

  

elastic-search单机部署以及中文分词IKAnalyzer安装的更多相关文章

  1. 在Solr中配置中文分词IKAnalyzer

    李克华 云计算高级群: 292870151 交流:Hadoop.NoSQL.分布式.lucene.solr.nutch 在Solr中配置中文分词IKAnalyzer 1.在配置文件schema.xml ...

  2. Elasticsearch 中文分词(elasticsearch-analysis-ik) 安装

    由于elasticsearch基于lucene,所以天然地就多了许多lucene上的中文分词的支持,比如 IK, Paoding, MMSEG4J等lucene中文分词原理上都能在elasticsea ...

  3. Solr6.5配置中文分词IKAnalyzer和拼音分词pinyinAnalyzer (二)

    之前在 Solr6.5在Centos6上的安装与配置 (一) 一文中介绍了solr6.5的安装.这篇文章主要介绍创建Solr的Core并配置中文IKAnalyzer分词和拼音检索. 一.创建Core: ...

  4. solr 中文分词 IKAnalyzer

    solr中文分词器ik, 推荐资料:http://iamyida.iteye.com/blog/2220474?utm_source=tuicool&utm_medium=referral 使 ...

  5. Sphinx中文分词详细安装配置及API调用实战

    这几天项目中需要重新做一个关于商品的全文搜索功能,于是想到了用Sphinx,因为需要中文分词,所以选择了Sphinx for chinese,当然你也可以选择coreseek,建议这两个中选择一个,暂 ...

  6. Centos下Sphinx中文分词编译安装测试---CoreSeek

    要支持中文分词,还需要下载Coreseek,可以去官方搜索下载,这里我用的4.1 百度云下载地址:      https://pan.baidu.com/s/1slNIyHf tar -zxvf co ...

  7. elasticsearch ik中文分词器安装

    特殊说明:灰色文字用来辅助理解的. 安装IK中文分词器 我在百度上搜索了下,大多介绍的都是用maven打包下载下来的源码,这种方法也行,但是不够方便,为什么这么说? 首先需要安装maven吧?其次需要 ...

  8. SCWS中文分词,安装说明(以:Win32环境、utf8字符集为例)

    SCWS官方网站:http://www.xunsearch.com/scws/ 1. 根据您当前用的 PHP 版本,下载相应已编译好的 php_scws.dll 扩展库.    目前支持 PHP-5. ...

  9. solr 5.5.1安装并配置中文分词IKAnalyzer

    http://www.360doc.com/content/16/0623/17/5131531_570184594.shtml ——————————————————————————————————— ...

随机推荐

  1. codeforces 8c Looking for Order

    https://vjudge.net/problem/CodeForces-8C 题意: 一个平面上放着许多东西,每个东西都有一个坐标,最开始一个人在一个起始坐标,她出发去拿东西,一次要么拿一件东西, ...

  2. 关于http与https区别

    http与https: http叫超文本传输协议,信息为明文传输.https是具有安全性的传输协议,是由http+ssl层,需要到ca申请证书,一般需要费用.信息为加密传输,需要验证用户身份.二者的端 ...

  3. sqlDependency监控数据库数据变化,自动通知

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  4. asp.net(C#)利用QRCode生成二维码

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="QRCode.aspx.cs&q ...

  5. 吾八哥学Python(二):Python代码编辑器的选用

    Python开发环境配置好了,但发现自带的代码编辑器貌似用着有点不大习惯啊,所以咱们就找一个"好用的"代码编辑器吧,网上搜了一下资料,Python常用的编辑器有如下一些: 1. S ...

  6. IIS ApplicationPoolIdentity(配置IIS讀寫網站文件)

    原创地址:http://www.cnblogs.com/jfzhu/p/4067297.html 转载请注明出处 从IIS 7.5开始,Application Pool Identity的Built- ...

  7. win10 UWP 获取系统信息

    获取系统信息 Windows.System.Profile.AnalyticsVersionInfo analyticsVersion = Windows.System.Profile.Analyti ...

  8. 走进 UITest for Xamarin.Forms

    上一篇  走进 Prism for Xamarin.Forms 讲了简单的创建一个项目,然后添加了几个页面来回切换,这篇想先搞下 UITest 官方详细地址:https://developer.xam ...

  9. php代码常见错误详解整理

    错误类型: 一.未使用二进制上传   代码:    Fatal error: This encoded file is corrupted. Please refer to http://www.ze ...

  10. Maven Install指令构建时出现找不到符号

    检查引用的JRE编译的版本,可能由于JRE编译版本太低导致的