es索引的性能优化配置

获取所有索引

GET _cat/indices?index=*

查看所有模板,如果数据量多的话,可以进行纵向分表,例如按照日期将索引分开,然后通过建模板,配置索引的参数

GET _cat/templates

查看模板详情

GET _template/模板名称

获取集群的健康状态

GET /_cluster/health?level=indices

获取分片的状态

GET _cat/shards?v

查看unassigned的原因,通过查看原因也能得到问题的解决方案

GET /_cluster/allocation/explain

refresh_interval

刷盘时间,数据实时性的延迟

配置分片数:一般来说内存每G最多20个,每个分片数据大概在20G到50G

number_of_shards

配置副本数:一般1就行,需要更高的可靠性可以设置为3

number_of_replicas

设置索引每个节点最大的分片数:规则下面的数要大于分片数(包括副本)/集群集群节点数

index.routing.allocation.total_shards_per_node

相关推荐
PC2005-cloud3 小时前
Elasticsearch 学习笔记:集群实战(3 控制节点 + 3 数据节点部署与故障转移)
笔记·学习·elasticsearch
Devin~Y4 小时前
从内容社区到AI智能客服:Spring Boot + Spring Cloud + Spring AI 全栈实战面试拆解
java·spring boot·redis·elasticsearch·spring cloud·kafka·mybatis
凤山老林7 小时前
复杂检索引擎落地:Spring Boot + Elasticsearch 数据同步与高阶查询实战
spring boot·后端·elasticsearch
Elastic 中国社区官方博客1 天前
你的 AI agent 不需要你的 API 密钥:使用 OAuth 2.1 对 Elasticsearch MCP 服务器进行身份验证
大数据·运维·人工智能·elasticsearch·搜索引擎·全文检索
互联网中的一颗神经元1 天前
ZZ — Git 速查表
大数据·git·elasticsearch
Elasticsearch1 天前
跳过有状态的 OTel Collector:Elasticsearch 9.5 原生存储两种指标时间类型
elasticsearch
C++、Java和Python的菜鸟2 天前
第2章 项目前置课-代码版本控制Git
大数据·elasticsearch·搜索引擎
Elasticsearch2 天前
什么是混合搜索?
elasticsearch
Elasticsearch2 天前
从点击流中提升搜索相关性:使用 Learn To Rank 和 OpenTelemetry 行为信号
elasticsearch
倒流时光三十年2 天前
第六阶段 57 · ES|QL 与 SQL API(用 SQL 查 ES)
数据库·sql·elasticsearch