我在Elasaticsearch中有这样的数据:
{"number1":1 ,"result":0 , "date":"2018-01-17T01:00:57Z"}
{"number1":5 ,"result":0 , "date":"2018-01-17T02:00:57Z"}
{"number1":6 ,"result":0 , "date":"2018-01-17T03:00:57Z"}
{"number1":4 ,"result":0 , "date":"2018-01-17T04:00:57Z"}
我想查询结果:
{"number1":1 ,"result":4 , "date":"2018-01-17T01:00:57Z"}
{"number1":5 ,"result":1 , "date":"2018-01-17T02:00:57Z"}
{"number1":6 ,"result":-2 , "date":"2018-01-17T03:00:57Z"}
{"number1":4 ,"result":0 , "date":"2018-01-17T04:00:57Z"}
注意:result =(第二行中的number1) - (第一行中的number1)...