View more Java development environment configuration, click the "Java development environment configuration Filmography"
Pick up Chapter: ElasticSearch installation tutorial
1) go to the official website to download the installation package ElasticSearch
No Chinese selected directory, unzip ElasticSearch installation package that is installed;
2) configuration environment variable
In the original PATH is added: D: \ tensquare_APP \ elasticsearch-5.6.8 \ elasticsearch-5.6.8 \ bin;
cmd elasticsearch performed, displaying two ports, java development by 9300, 9200 with the other;
Browser and enter http: // localhost: 9200 will return data that started successfully.
3) install a graphical interface premise environment
3.1 The graphical interface is node.js do, so install node.js
node.js is a javascript runtime environment;
Front and rear end can use the same js file, but the back end usually implemented in java;
Download Path: https://nodejs.org/zh-cn/download/
After downloading the installation package directly next installation; input node -v view the dos version.
3.2 Installation npm
node package management and distribution tools;
node.js using the installation package we rely js NPM;
vue the need to install npm WebPACK;
npm installed with Node.js;
However, to configure some path in order to download remote download js package from the specified directory, create npm_modules and npm_cache folder under Node folder, and then win + r, cmd, enter npm config set prefix "D: \ tensquare_APP \ nodejs \ npm_modules "; continue to enter the implementation npm config set cache" D: \ tensquare_APP \ nodejs \ npm_cache ".
3.3 Installation cnpm
Instead of npm, download js package from domestic Taobao mirror;
dos execute the command: the install NPM = -g CNPM --registry https://registry.npm.taobao.org ;
See image point position nrm ls, an output result of a front * indicates the address pointed to by the mirror;
Specify the location of command nrm use taobao (address), the replacement address.
3.4 will be installed as a global command grunt
win + r + cmd, performed npm install -g grunt-cli command;
4) install a graphical interface (head plug)
Online search elasticsearch head download it, unzip to any installation directory;
Installation depends: win + r + cmd, graphical installation package into the path D: \ tensquare_APP \ elasticsearch-head-master \ elasticsearch-head-master, Run cnpm install;
Start graphical interface: win + r + cmd, into the graphical installation package path D: \ tensquare_APP \ elasticsearch-head-master \ elasticsearch-head-master, Run grunt server; default port 9100; browser enter http: / / localhost: 9100 / to access.
5) ElasticSearch configuration allows cross-domain access
Find D: \ tensquare_APP \ elasticsearch-5.6.8 \ elasticsearch-5.6.8 \ config \ elasticsearch.yml file, add the following in the bottom 2 lines of code:
http.cors.enabled: true
http.cors.allow-origin: "*"
6) arranged IK tokenizer
Download IK word installation package:
https://github.com/medcl/elasticsearch-analysis-ik/releases
The decompressed IK segmenter insert package into D: \ tensquare_APP \ the plugins elasticsearch-5.6.8 \ elasticsearch-5.6.8 \ to
7) Add IK vocabulary (such as some popular online word)
In D: \ create \ plugins \ ik elasticsearch under tensquare_APP \ elasticsearch-5.6.8 \ elasticsearch-5.6.8 \ \ config a file named myword.dic, adding vocabulary (such as rich handsome) on the inside, and then at the same level Enabling the file under IKAnalyzer.cfg.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<! DOCTYPE the Properties the SYSTEM "http://java.sun.com/dtd/properties.dtd">
<the Properties>
<the Comment> IK Analyzer extended configuration </ the Comment>
<-! Where users can configure their own extensions dictionary ->
<entry Key = "ext_dict"> myword.dic </ entry>
<-! where users can configure their own extensions stop word dictionary ->
<entry Key = "ext_stopwords"> </ entry>
<! - where users can configure the remote extension dictionary ->
<-! <entry Key = "remote_ext_dict"> words_location </ entry> ->
<-! where users can configure the remote extension stop word dictionary ->
<-! <entry Key = "remote_ext_stopwords"> words_location </ entry> ->
</ Properties>
Test whether entry into force: http: // localhost: 9200 / _analyze analyzer = ik_max_word & pretty = true & text = high handsome?