ElasticSearch Aggregations GroupBy 实现源码分析

2022-01-06 00:00:00 字段 多个 文件 数组 下标

在前文 ElasticSearch Aggregations 分析 中,我们提及了 【Aggregation Bucket的实现】,然而只是用文字简要描述了原理。今天我们会举个实际groupBy的例子进行剖析,让大家对ElasticSearch Aggregations 的工作原理有更深入的理解

准备工作

  • 为了方便调试,我对索引做了如下配置
{
"mappings": {
"my_type": {
"properties": {
"newtype": {
"type": "string",
"index": "not_analyzed"
},
"num": {
"type": "integer"
}
}
}
},
"settings" : {
"index" : {
"number_of_shards" : 1,
"number_of_replicas" :
}
}
}

相关文章