
elasticsearch
kong-kong
记录流水账
展开
-
docker安装kibana6.5.0
下载镜像docker pull kibana:6.5.0安装docker run -d --name kibana -e ELASTICSEARCH_URL=http://172.16.5.98:9200 -p 5601:5601 kibana:6.5.0验证http://$ip:5601原创 2022-04-21 00:14:29 · 3003 阅读 · 0 评论 -
docker安装elasticsearch:6.5.0
下载镜像docker pull elasticsearch:6.5.0查看镜像docker images启动镜像docker run --name elasticsearch -d -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -p 9200:9200 -p 9300:9300 elasticsearch:6.5.0查看启动情况docker ps -a启动失败查看日志docker logs -f 3c7fmax virtual memory ar原创 2022-04-20 23:22:59 · 2318 阅读 · 0 评论 -
elasticsearch search api
uri search# 根据code字段查GET /inventory2/_search?q=code:0052# 多个index查找GET /inventory1,inventory2/_search?q=code:0052# 全部index查找GET /_all/_search?q=tag:wowhttps://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-request-body.html...翻译 2020-06-01 19:10:42 · 248 阅读 · 0 评论 -
cluster api
# If no filters are given, the default is to select all nodesGET /_nodes# Explicitly select all nodesGET /_nodes/_all# Select just the local nodeGET /_nodes/_local# Select the elected master nodeGET /_nodes/_master# Select nodes by name, w...翻译 2020-05-30 18:07:23 · 434 阅读 · 0 评论 -
elasticsearch分片
# 获取分片地址GET /inventory2/_search_shards?routing=30原创 2020-05-30 17:49:52 · 243 阅读 · 0 评论 -
elasticsearch-head安装
本次安装过程中出现报错问题请参考:https://blog.youkuaiyun.com/kq1983/article/details/106437714# 如果git没装yum -y install gitgit clone git://github.com/mobz/elasticsearch-head.git# 淘宝镜像npm install -g cnpm --registry=https://registry.npm.taobao.org# 验证cnpmcnpm -v# 如果.原创 2020-05-30 14:50:05 · 308 阅读 · 0 评论 -
安装elasticsearch-head报错相关问题
1.bzip2: Cannot exec: No such file or directorytar (child): bzip2: Cannot exec: No such file or directorytar (child): Error is not recoverable: exiting nowtar: Child returned status 2tar: Error is not recoverable: exiting now# 安装bzip2yum...原创 2020-05-30 10:16:57 · 817 阅读 · 0 评论 -
elasticsearch集群安装
版本elasticsearch-6.5.1服务器172.16.5.1172.16.5.3172.16.6.204先在每台机器上安装好es,参照https://blog.youkuaiyun.com/kq1983/article/details/84429757进入目录cd /usr/local/elasticsearch-6.5.1/configvi elasticsearch.ymles51cluster.name: elasticsearchnode...原创 2020-05-29 18:59:48 · 365 阅读 · 0 评论 -
elasticsearch7安装
下载# 下载包 curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.7.0-linux-x86_64.tar.gz# 或wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.7.0-linux-x86_64.tar.gz解压# 解压tar -xvf elasticsea...翻译 2020-05-29 16:32:02 · 335 阅读 · 0 评论 -
elasticsearch index
索引# 创建索引 如果索引以及存在会报错PUT blog# 删除索引DELETE blog# 索引是否存在HEAD blog# 查看索引GET _cat/indices分片、副本# 分片、副本# 查看索引setting信息GET blog/_settings# 查看多个索引setting信息GET blog,article/_setti...原创 2019-10-24 01:01:59 · 280 阅读 · 0 评论 -
es的mapping数据类型
https://www.elastic.co/guide/en/elasticsearch/reference/6.5/mapping-types.htmlrange datatypescoerce尝试将字符串转换为数字,并截断整数部分。接受true(默认)和false。boost映射字段级查询时间的增加。接受浮点数,默认为1.0。index该字段是...原创 2019-10-24 00:03:17 · 1565 阅读 · 0 评论 -
Field.Store.YES or NO
Field.Store.YES或者NO(存储域选项)设置为YES表示或把这个域中的内容完全存储到文件中,方便进行文本的还原设置为NO表示把这个域的内容不存储到文件中,但是可以被索引,此时内容无法完全还原(doc.get)Field.Index(索引选项)Index.ANALYZED:进行分词和索引,适用于标题、内容等Index.NOT_ANALYZED:进行索引,但是...转载 2019-10-21 23:57:27 · 440 阅读 · 0 评论 -
elasticsearch website
# indexhttps://www.elastic.co/guide/en/elasticsearch/reference/7.4/index.html1# restful apihttps://www.elastic.co/guide/en/elasticsearch/reference/7.4/rest-apis.html# java apihttps://www.e...原创 2019-10-17 21:48:02 · 290 阅读 · 0 评论 -
elasticsearch docker
https://www.elastic.co/guide/en/elasticsearch/reference/6.6/docker.html翻译 2019-10-17 21:37:29 · 310 阅读 · 0 评论 -
elasticsearch安装问题
问题1: can not run elasticsearch as rootgroupadd esuseradd es -g eschown -R es:es /usr/local/elasticsearch-6.5.1 该命令是更改该文件夹下所属的用户组的权限su es #切换用户 问题2:max file descriptors [65531] f...原创 2018-11-24 12:14:13 · 241 阅读 · 0 评论 -
IK中文分词器安装
分词器路径https://github.com/medcl/elasticsearch-analysis-ik/releases下载与elasticsearch一样的版本wget https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.5.0/elasticsearch-analysis-ik-...原创 2018-11-24 17:12:18 · 297 阅读 · 0 评论 -
elasticsearch api
?v 要求返回表头_cat命令 可以查看支持的命令http://{ip}:9200/_cat看索引http://192.168.3.200:9200/_cat/indices?v看健康状态http://192.168.3.200:9200/_cat/health?v看集群节点http://192.168.3.200:9200/_cat/nodes?v...原创 2018-11-27 22:00:12 · 213 阅读 · 0 评论 -
kibana install
产品地址:https://www.elastic.co/cn/products/kibana 下载地址:https://artifacts.elastic.co/downloads/kibana/kibana-6.5.1-linux-x86_64.tar.gz安装tar -xzvf kibana-6.5.1-linux-x86_64.tar.gz -C /usr/lo...原创 2018-11-26 17:47:31 · 351 阅读 · 0 评论 -
elasticsearch vs rdms
RDMS ELASTICSEARCH 数据库(database) 索引(index) 表(table) 类型(type) 行(row) 文档(document) 列(column) 字段(field) 表结构(schema) 映射(mapping) 索引 全文索引 SQL 查询DSL select * from...原创 2018-11-26 22:44:03 · 282 阅读 · 0 评论 -
elasticsearch index api
新建或修改索引PUT twitter/_doc/1{ "user" : "kimchy", "post_date" : "2009-11-15T14:12:12", "message" : "trying out Elasticsearch"}创建并自动生成IDPOST twitter/_doc/{ "user"原创 2018-11-27 22:00:46 · 322 阅读 · 0 评论 -
NoClassDefFoundError: org/elasticsearch/common/xcontent/DeprecationHandler问题
maven <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> ...原创 2018-12-14 09:49:02 · 13678 阅读 · 0 评论 -
Java High Level REST Client
https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high.htmlhttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.5/java-rest-high-getting-started-maven.ht...原创 2018-12-18 23:49:51 · 550 阅读 · 0 评论 -
elasticsearch 接口
#To check the cluster healthGET /_cat/health?v#get a list of nodesGET /_cat/nodes?v# list all indicesGET /_cat/indices?v# create an index named "customer" and then list all the index...原创 2019-04-15 13:29:02 · 388 阅读 · 0 评论 -
elasticsearch install
看jdk版本java -versionecho $JAVA_HOME下载包curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.1.tar.gzwget https://artifacts.elastic.co/downloads/elasticsearch/elas...原创 2018-11-24 12:54:35 · 346 阅读 · 0 评论