elasticsearch学习

0.elasticsearch6.4.3配置文件 elasticsearch.yml cluster.name: es6 node.name: node0 path.data: /usr/local/elasticsearch-6.4.3/data path.logs: /usr/local/elasticsearch-6.4.3/logs network.host: 0.0.0.0

1.root账户不能启动es。
useradd esuser 新增用户
chown -R esuser /usr/local/elasticsearch-7.13.2 给用户授权
su esuser 切换用户
2.elasticsearch 启动报错 process is too low,修改limits.conf配置文件不生效问题解决
3.启动后,访问路径http://192.168.157.134:9200/。crtl+c 关闭
4.https://www.gugeapps.net/webstore/search?key=elasticsearch 下载es可视化插件ElasticSearch Head。
在浏览器可扩展程序里,添加插件。

5.建立ik中文分词器。https://gitee.com/elk_ext/elasticsearch-analysis-ik-ext?_from=gitee_search#https://github.com/medcl/elasticsearch-analysis-ik/release

 

 

6.自定义中文词库。

7.创建索引。http://192.168.157.134:9200/shop (put方法)
8.新增索引信息。http://192.168.157.134:9200/shop/_mapping (post方法)
9.使用match做分词匹配,使用term不做分词,直接匹配。
10.深度分页,限制分页数,100以内,以保证性能。
11.scroll滚动搜索。可以执行大批量文档搜索,不用付出深度分页的代价。
12.集群脑裂。

 

posted @ 2021-07-06 14:03  萧长风  阅读(33)  评论(0编辑  收藏  举报