2

这是我在 ElasticSearch 中的数据映射:

mapping = {
    "series-map": {
      "properties": {
        "network": {"type": "string"},
        "timestamp": {"type": "date"},
        "value": {"type": "integer"},
      }
    }
  }

数据示例:

Network   timestamp              value
paris     2016-04-16 12:00:00     30
toulouse  2016-04-17 13:00:00     14
paris     2016-04-16 22:00:00     45

几天来,我一直在试图弄清楚如何在特定的一天显示网络的价值。我试过这个 Timelion 表达式:

.es(index=myindex, timefield=timestamp, q='network:paris', metric='sum:value').label('current hour')

这是我得到的:

在此处输入图像描述

就像表达式向我显示每个时间戳有多少行或值一样。它没有显示价值本身。

请问该怎么做?有什么方法可以在没有任何聚合(如 avg、sum、max ... 等)的情况下显示值?

谢谢你。

弹性搜索 5.1 版

4

0 回答 0