技术栈
terms
冲上云霄的Jayden
2 个月前
elasticsearch
·
统计
·
script
·
aggs
·
terms
Elasticsearch 使用terms对long类型日期统计按月销售
索引mapping:payDate字段映射为long类型,在使用date_histogram统计时,统计不出想要的效果。
冲上云霄的Jayden
7 个月前
elasticsearch
·
script
·
聚合查询
·
terms
·
脚本数据源
·
must
·
bool
Elasticsearch terms使用脚本修改统计的数据源
如:索引中有两个 styleCode(类似spu)跟 goodsCode(类似sku)区分商品;现在需要根据品牌信息为七匹狼的数据使用goodsCode就行统计。