
elasticsearch
文章平均质量分 62
公司扫地僧
……
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
分片掉线恢复
curl -XPOST '192.168.1.101:9200/_cluster/reroute?pretty' -H 'Content-Type: application/json' -d'{ "commands" : [ { "allocate_replica" : { "index" : "fragment", "shard" : 6, "node" : "node-107-0" ...原创 2022-02-28 00:13:51 · 270 阅读 · 0 评论 -
最新版本库设计
curl -XPUT 127.0.0.1:9200/category?pretty -d '{ "settings" : { "index" : { "number_of_shards" : 1, "number_of_replicas" : 0 } }, "mappings" : { "literature" : { "properties"...原创 2021-02-21 15:10:13 · 190 阅读 · 0 评论 -
es表设计
curl -XPUT 127.0.0.1:9200/l?pretty -d '{ "settings" : { "index" : { "number_of_shards" : 4 , "number_of_replicas" : 0 }, "analysis": { ...原创 2019-10-20 09:19:35 · 517 阅读 · 0 评论 -
你救了我一命之 分片不上线,强制上线
curl -XPOST 'localhost:9200/_cluster/reroute?pretty' -H 'Content-Type: application/json' -d'{ "commands" : [ {"allocate_stale_primary" : { "index" : "fragment", "shard" : 7, "node" : "nod翻译 2018-04-09 19:15:35 · 407 阅读 · 1 评论 -
修改分片副本
curl -XPUT 'localhost:9200/索引名/_settings' -d'{ "number_of_replicas": 1}'上线curl -XPOST 'localhost:9200/_cluster/reroute?pretty' -H 'Content-Type: application/json' -d'{ "commands" : [ {...原创 2018-03-27 11:23:56 · 345 阅读 · 0 评论 -
Elasticsearch线程池介绍
每个Elasticsearch节点内部都维护着多个线程池,如index、search、get、bulk等,用户可以修改线程池的类型和大小,线程池默认大小跟CPU逻辑一致,本文基于最新的Elasticsearch2.3.x一、查看当前线程组状态[html] view plain copycurl -XGET 'http://localhost:9200/_nodes/stats?pretty' [...转载 2018-03-18 11:38:22 · 427 阅读 · 0 评论 -
查看ElasticSearch服务状态和结果的URL
1,查看es集群状态http://ip:port/_cat/health?v2,集群节点健康查看http://ip:port/_cat/nodes?v 3,列出集群索引http://ip:port/_cat/indices?v 索引相关URL说明/index/_search不解释/_aliases获取或操作索引的别名/index/ /index/type/创建或操作类型/index/_mappi...转载 2018-03-18 10:37:00 · 2359 阅读 · 0 评论 -
索引关闭、打开,修改 preload 配置
curl -XPOST 'localhost:9200/fragment/_close'curl -XPUT 'localhost:9200/fragment/_settings?pretty' -H 'Content-Type: application/json' -d'{ "index.store.preload": ["*"]}'curl -XPOST 'localhost:9200/...原创 2018-03-17 23:07:05 · 1125 阅读 · 0 评论 -
Pre-loading data into the file system cache
By default, Elasticsearch completely relies on the operating system file system cache for caching I/O operations. It is possible to set index.store.preload in order to tell the operating system to loa...转载 2018-03-17 17:21:31 · 362 阅读 · 0 评论 -
elasticsearch Get multiGet Java Client
Get APIeditThe get API allows to get a typed JSON document from the index based on its id. The following example gets a JSON document from an index called twitter, under a type called tweet, with id v...转载 2018-03-16 14:14:38 · 736 阅读 · 0 评论 -
Elasticsearch分片管理命令,移动,上线,取消等
Cluster RerouteeditThe reroute command allows to explicitly execute a cluster reroute allocation command including specific commands. For example, a shard can be moved from one node to another explici...转载 2018-03-16 13:27:22 · 2743 阅读 · 0 评论 -
es笔记
锁内存vi /etc/security/limits.conf 增加两行es soft memlock unlimitedes hard memlock unlimitedvi config/elasticsearch.yml 增加bootstrap.memory_lock: true查看状态curl -XGET 'localhost:9200/_nodes?filter_path=**.mloc...原创 2018-03-17 23:46:23 · 634 阅读 · 0 评论 -
Elasticsearch V5.1.1安装IK分词
Elasticsearch版本5.1参考来源:https://github.com/medcl/elasticsearch-analysis-ik一、首先确保jdk版本在1.8以上# java -versionjava version "1.8.0_112"Java(TM) SE Runtime Environment (build 1.8.0_112-b15)原创 2017-02-07 00:44:12 · 2394 阅读 · 0 评论 -
ElasticSearch笔记
批量(_bulk)操作:一个好的批次最好保持在5~15MB原创 2017-02-06 09:43:50 · 530 阅读 · 0 评论 -
搭建ElasticSearch 5.2 Java API开发环境
版本:ElasticSearch 5.2.0 在Eclipse下直接创建Java Project,并引入ES目录下的lib包这种是行不通的,会找不到PreBuiltTransportClient类。 正确的做法是使用Maven生成项目(Maven是什么?请自行百度脑补,我也是刚脑补完成,之前没用过,请原谅我的Low B!新版本的Eclipse是自带了Mave原创 2017-02-06 00:28:22 · 6932 阅读 · 8 评论 -
Elasticsearch内存设置
参考自《Elasticsearch Definitive Guide》 Elasticsearch默认堆内存为1 GB,对于实际应用,显然不够,不建议使用默认配置。 设置Elasticsearch的内存又两种方案,最简单的方法是设置一个环境变量为ES_HEAP_SIZE。当服务器启动时,它将读取此环境变量并相应设置内存。命令如下:export ES_HEAP原创 2017-02-04 16:09:26 · 21782 阅读 · 0 评论 -
Elasticsearch 5.1.1使用笔记,欢迎探讨
网上关于elasticsearch的教程已经很多了,本人主要是将安装过程中的一些步骤或遇到的问题备注留作以后使用,有兴趣的看客欢迎交流。安装运行1、前置安装java8jdk-8u112-linux-x64.rpm下载地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html2、下载w原创 2016-12-26 22:58:28 · 14980 阅读 · 1 评论