本人使用mac,win不晓得有没有差别
1.下载
2.安装
解压,进入到文件下的bin目录 ./elasticsearch 即可启动。
启动之后访问:http://localhost:9200/ 显示页面即为启动成功
3.安装插件
一般都会安装一个head插件,方便看数据
插件列表:http://www.searchtech.pro/elasticsearch-plugins 安装方法,自行百度,谷歌大法
4.常用的网址命令
查看有多少 Index
http://localhost:9200/_cat/indices?v
head查看,方便
http://localhost:9200/_plugin/head/
查看index里面属性类型
http://localhost:9200/_mapping?pretty=true
5.springboot集成
导入相应maven,公司自己封装的,等我找到在贴
spring.data.elasticsearch.cluster-name=dev (这个一定要和els目录下config 那个yml文件 cluster-name一致) spring.data.elasticsearch.cluster-nodes=127.0.0.1:9300
为什么要用这个呢,是因为我们数据库采用的是cassandra,键值对的形式,数据量庞大的查找很困难,然后依靠els的查找方便,直接走起。