1.首先去官网下载Elasticsearch
下载地址

我这里选择的是7.17.18

选择windows版本

下载完成后解压是这样的

下载完成后点击elasticsearch.bat启动elasticsearch服务

输入http://localhost:9200看到如下信息说明启动成功。

还有记得修改elasticsearch.yml文件,创建node名称和配置网络方便elasticsearch-head链接

bash
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: es-application
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: master
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
http.cors.enabled: true
http.cors.allow-origin: "*"
2.下载Kibana
kibana下载地址
注意:Kibana的版本要和Elasticsearch的版本一致

选择对应的版本

下载kibana

解压后是这样

启动kibana服务

输入http://localhost:5601/出现如下页面说明启动成功

3.下载elasticsearch-head图形管理界面方便查看
https://github.com/mobz/elasticsearch-head
下载完成后解压

运行前,执行安装grunt环境
npm install grunt --save-dev
然后运行项目
npm run start

4.接着下载ik分词器 (对中文文本进行分词可以显著提示检索效率)
ik分词器下载地址
https://release.infinilabs.com/analysis-ik/stable/

ik分词器的版本要能对应上
下载完成后解压放入plugins文件夹,然后重启Elasticsearch即可

python中可以通过put请求批量添加数据

通过get请求查询数据

也可以发送delete请求来删除数据

查询速度快的飞起!!!

