一.ElasticSearch的功能
1.使搜索更加高效
2.完全免费
3.能过通过json和HTTP进行交互
4.搜索服务稳定
5.易于扩展,能将一台服务器扩展到很多台
6.分布式多用户的搜索引擎
二.关系数据库的搜索缺点
1.无排序
2.无分布式
3.无法解决搜索请求
4.效率低
5.分词
三.elasticsearch的安装
由于elastic没有集成中文插件,所以我们选择安装elasticsearch-RTF
插件。
下载地址:
https://github.com/medcl/elasticsearch-rtf
cd elasticsearch/bin
elasticsearch.bat
访问:http://127.0.0.1:9200/
四.安装head插件
head插件的作用是使存放在elasticsearch中的数据可视化。
如果没有npm命令需要安装node
没有git命令的可以直接下载后解压
下载地址
http://mobz.github.io/elasticsearch-head
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
npm run start
访问 http://localhost:9100/
如果出现连接失败或未连接修改
打开下面路径里的。yml文件
末尾添加
http.cors.enabled: true
http.cors.allow-origin: "*"
五 kibana的安装
安装对应版本的kibana
选择对应elasticsearch版本
下载地址
https://www.elastic.co/cn/downloads/past-releases#kibana
进入kibana的安装目录的bin下启动kibana.bat文件
访问:http://127.0.0.1:5601/