全文搜索引擎 Elasticsearch
2019-01-29 本文已影响10人
云龙789
首先安装 java 环境 sudo apt-get install default-jre
- 安装 elastic
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.1.zip
$ unzip elasticsearch-5.5.1.zip
$ cd elasticsearch-5.5.1/
- 启动 Elastic
./bin/elasticsearch
默认是 9200 端口
vagrant@homestead:~$ curl localhost:9200
{
"name" : "6AKT6r3",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "dCkD2MoLStibGouqvXdrvA",
"version" : {
"number" : "5.5.1",
"build_hash" : "19c13d0",
"build_date" : "2017-07-18T20:44:24.823Z",
"build_snapshot" : false,
"lucene_version" : "6.6.0"
},
"tagline" : "You Know, for Search"
}
其他的直接参看推荐资料好了
- 添加中文分词
$ cd elasticsearch-5.5.1/
$ ./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.3.0/elasticsearch-analysis-ik-6.3.0.zip