
es
文章平均质量分 50
自驱
ALOHA HEJA HE
展开
-
ES install
1 ES启动遇到问题下载地址wgethttps://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.1-linux-x86_64.tar.gz集群模式运行在一台机器#打开第68行注释,ip替换host1等,多节点请添加多个ip地址,单节点可写按默认来#配置以下三者,最少其一#[discovery.seed_hosts, discovery.seed_providers, cluster.initial_...原创 2021-08-20 07:39:04 · 156 阅读 · 0 评论 -
【ES】 查询优化实践3点小结
1 去掉ES 部分查询条件(对结果集的影响较小,但是增加es的计算代价),到应用内存中进行看样子{"term":{"join_state":{"value":1,"boost":1.0}}} 去掉更快,这个状态的过滤完全可以放内存中计算。去掉条件之后:2 启用停用词 比如ik的热更新一个"的"查询好点了73%的资源,但是对结果集的价值确实微乎其微使用ik停用词后:3 控制写入速度平稳性瞬时写入增加,造成gc overhead,导致业务延迟...原创 2021-01-02 11:21:49 · 139 阅读 · 0 评论 -
java.lang.NoSuchMethodError: org.elasticsearch.action.support.master.AcknowledgedResponse.fromXConte
环境:ES 6.7版本 使用java 7.2依赖Caused by: java.lang.NoSuchMethodError: org.elasticsearch.action.support.master.AcknowledgedResponse.fromXContent(Lorg/elasticsearch/common/xcontent/XContentParser;)Lorg/elasticsearch/action/support/master/AcknowledgedResponse;..原创 2020-11-21 16:21:38 · 608 阅读 · 0 评论 -
画蛇添足 被ES MultiGetRequest 的 fetchSourceContext 坑了!
ES 版本6.3.2org.elasticsearch.action.get.MultiGetRequest.Item#fetchSourceContext(org.elasticsearch.search.fetch.subphase.FetchSourceContext) FetchSourceContext fetchSourceContext = new FetchSourceContext(true, includes, Strings.EM原创 2020-10-16 20:52:09 · 2420 阅读 · 0 评论 -
ElasticSearch 7.5.1+ 指定分词器查询一次完整搜索debug过程 (2020-10)
// 调试时学习源码一个途径(you agree?)org.elasticsearch.client.node.NodeClient#executeLocally(org.elasticsearch.action.ActionType, Request, org.elasticsearch.action.ActionListener)org.elasticsearch.client.node.NodeClient#transportAction--- value transportAction原创 2020-10-09 19:51:38 · 1712 阅读 · 1 评论 -
【ES增加索引字段】正确的姿态
PUT /a_/b_c/_mapping{ "properties":{ "uv": { "type": "long" }, "exposoure": { "type": "integer" } }}说明 : a_ 为index...原创 2019-11-16 14:29:27 · 1253 阅读 · 0 评论 -
【ES 分页限制】分页最多不能超1W记录排序以及解决方案以及scroll和scroll-scan区别
1【理解】1 请求第20页,假设你有16个分片,则需要在coordinate node 汇总到shards* (from+size)条记录,即需要 16*(20+10)记录后做一次全局排序,再最终取出 from后的size条结果作为最终的响应。2 当索引非常非常大(千万或亿),是无法安装 from + size 做深分页的,分页越深则越容易OOM,即便不OOM,也是很消耗CPU和内存资源...原创 2019-10-13 10:38:45 · 4945 阅读 · 0 评论 -
【ES 自定义分词器】中文非IK分词
对于索引中的标签,不使用ik分词,但是希望指定分隔符,本文的示例代码,可能对你有用!PUT demo{ "settings":{ "analysis":{ "analyzer":{ "douhao":{ "type":"pattern", "pattern":"," } } ...原创 2019-08-21 18:33:49 · 436 阅读 · 0 评论 -
Deprecation: analyzer request parameter is deprecated and will be removed in the next major release.
独立参数方式已经被抛弃了#! Deprecation: text request parameter is deprecated and will be removed in the next major release. Please use the JSON in the request body instead request param#! Deprecation: analyzer...原创 2019-04-02 17:01:17 · 3307 阅读 · 0 评论