Elasricsearch 优化Terms聚合的性能

Posted action-go

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Elasricsearch 优化Terms聚合的性能相关的知识,希望对你有一定的参考价值。

Warm up global ordinals
Global ordinals are a data-structure that is used in order to run terms aggregations on keyword fields. They are loaded lazily in memory because Elasticsearch does not know which fields will be used in terms aggregations and which fields won’t. You can tell Elasticsearch to load global ordinals eagerly at refresh-time by configuring mappings as described below:

PUT index
{
  "mappings": {
    "properties": {
      "foo": {
        "type": "keyword",
        "eager_global_ordinals": true
      }
    }
  }
}

原文链接:https://www.elastic.co/guide/en/elasticsearch/reference/7.1/tune-for-search-speed.html

以上是关于Elasricsearch 优化Terms聚合的性能的主要内容,如果未能解决你的问题,请参考以下文章

elasticsearch聚合之terms

性能测试学习之路 jmeter常见性能指标(聚合报告 && 服务器性能监控配置 && 图形结果 && 概要报告)

ES 在聚合结果中进行过滤

5.terms搜索多个值以及多值搜索结果优化

elasticsearch——部分聚合结果不准确

ES聚合(查询分享数量大于30的uuid)