Elasticsearch
Marvin Zhong
做自己,坚持梦想,努力...
展开
-
elastic error - Text fields are not optimised for operations
Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default原创 2022-06-22 16:11:59 · 538 阅读 · 0 评论 -
Trying to create too many scroll contexts. Must be less than or equal to: [20000]
elastic 当scroll并发数量超过设定数量时会报Trying to create too many scroll contexts. Must be less than or equal to: [20000]错误.在7.6.2版本,若是报出这个错误,会造成读取的数据的version混乱,若此时更新数据,会造成version冲突. 我仔细想了想,这种version混乱应该是集群中的主分片和副本分片中的值造成不一致产生的.或者是因为scroll查出限制的机器返回的version有问题,造成更新数据原创 2022-03-10 23:14:06 · 2684 阅读 · 0 评论 -
elastic search 数组
Arrays | Elasticsearch Guide [7.6] | Elasticelastic 本身是支持数组的,但是没有特定的数组类型来支持, 下面我举例数组的使用.官方文档见链接Arrays | Elasticsearch Guide [7.6] | Elastic1. 创建一个测试index: test_array{ "mappings": { "properties": { "location": {原创 2022-01-04 14:21:02 · 1524 阅读 · 0 评论 -
elastic 跨集群复制 cross cluster replication
CCR 是一项白金级功能,开源免费版不支持这个功能. 可通过 30 天试用许可证获取;该许可证既可通过start trial API激活 ,也可以直接从 Kibana 激活。1. kibana激活激活后左侧显示cross-cluster replication菜单2. 添加Leader添加leader节点,即主数据节点3. 添加ccr follower创建完成之后会会自动同步.注意,这里leader和follower集群必须都开通了ccr,即白金版证书...原创 2021-12-22 15:55:49 · 255 阅读 · 0 评论 -
Elastic index 挂了
1. 查看当前索引健康状况GET /_cluster/health?pretty2. 查看具体原因/_cluster/allocation/explain?pretty{ "node_id": "XioaAY71Sg6QjjwJ7Bydiw", "node_name": "lpc-elasticsearch-sit-10.122.29.109", "transport_address": "10.122.29.10原创 2021-12-03 11:03:41 · 2095 阅读 · 0 评论 -
ElasticsearchRestTemplate totalhits 测试
测试的目的: 想确认用ElasticsearchRestTemplate search的时候每次最大的返回值数量是多少.测试场景1: 默认es最大返回值为10000, 取5000个数据,结论 命中>=10000, 实际获取数量5000个2. 测试场景2: 默认es max_result_windows = 10000, 获取15000个数据.结论: 直接报错:Result window is too large, from + size must be less than or..原创 2021-09-01 11:52:53 · 788 阅读 · 0 评论 -
elasticsearch 常用命令
http://~~~:9200/_nodes/stats/indices/searchget 方法,查看当前elasticsearch的状态,包含scrollid数量原创 2021-08-27 19:15:47 · 102 阅读 · 0 评论 -
Mapping Set to Strict, Dynamic Introduction of [_Class] Within [_Doc] Is Not Allowed
强制对ES的mapping加了dynamic:strict限制后,突然报了Mapping Set to Strict, Dynamic Introduction of [_Class] Within [_Doc] Is Not Allowed.官方解释:Mapping uses type hints embedded in the document sent to the server to allow generic type mapping. Those type hints are repr原创 2021-05-13 22:58:42 · 4882 阅读 · 0 评论 -
elasticsearch 遇到的坑
1.No value specified for terms query{"error":{"root_cause":[{"type":"parsing_exception","reason":"No value specified for terms query","line":1,"col":8597}],"type":"parsing_exception","reason":"No value specified for terms query","line":1,"col":8597},"st.原创 2021-01-14 23:05:31 · 3051 阅读 · 0 评论