Expected numeric type on field
对物品销售价格存库,但是price是string类型,导致无法统计
"aggs": {
"chargehours": {
"date_histogram": {
"field": "@timestamp",
"interval": "day",
"format": "yyyy-MM-dd"
},
"aggs": {
"payercount": {
"value_count": {
"field": "playerId.keyword"
}
},
"totalsum" : {
"sum" : {
"field": "price.keyword"
}
}
}
}
}
请问有什么办法解决吗
对物品销售价格存库,但是price是string类型,导致无法统计
"aggs": {
"chargehours": {
"date_histogram": {
"field": "@timestamp",
"interval": "day",
"format": "yyyy-MM-dd"
},
"aggs": {
"payercount": {
"value_count": {
"field": "playerId.keyword"
}
},
"totalsum" : {
"sum" : {
"field": "price.keyword"
}
}
}
}
}
请问有什么办法解决吗
1 个回复
Cheetah
赞同来自:
5.0之后稍微好一点,可以调用reindex api