Link: https: //pan.baidu.com/s/1-EsuGaw0_9ubw5_9AhRS2Q extraction code: 1hp4
A, Elasticsearch environment preparation
elasticsearch-5.6.8.zip decompress it (the installation directory at random)
Start the service:
Access http://127.0.0.1:9200, shown below:
Show elasticsearch started successfully.
Second, install ES graphical interface plug-in
ElasticSearch installation of the plug-head to complete the effect graphical interface, complete view of the index data. Use the local installation of the plug installation head. elasticsearch-5- * needs to be installed above the installation head node and grunt.
1, the elasticsearch-head-master.zip archive into any directory, but to distinguish the installation directory and open elasticsearch
2, install node.js
3, the grunt installed as global commands, Grunt is based on Node.js project build tools, enter the following command in cmd execution console:
npm install -g grunt-cli
Results are as follows:
Note: If the installation is unsuccessful or slow installation, you can use Taobao mirrored installation:
npm install -g cnpm –registry=https://registry.npm.taobao.org
When subsequent use, just need npm xxx can be replaced cnpm xxx
4, modify elasticsearch profile: elasticsearch.yml, add the following three commands:
http.cors.enabled: true
http.cors.allow-origin: "*"
network.host: 127.0.0.1
5. Restart
6,进入head目录启动head,在命令提示符下输入命令:grunt server
7,地址栏访问:http://localhost:9100
备注:如果第5步失败,执行以下命令
再根据提示按以下方式依次安装组件
三,安装IK分词器
1,elasticsearch-analysis-ik-5.6.8.zip
2,解压,将解压后的elasticsearch文件夹拷贝到elasticsearch-5.6.8\plugins下,并重命名文件夹为ik
3,重新启动ElasticSearch,即可加载IK分词器
4,测试
地址栏测试:http://127.0.0.1:9200/_analyze?analyzer=ik_smart&pretty=true&text=我是程序员