SQL :
SELECT lastTime - firstTime as result FROM times;
查询将如何查看 Elasticsearch ?
答案 0 :(得分:1)
我找到了答案:
{
"size": 10,
"script_fields": {
"duration": {
"script": "doc[\"lastTime\"].date.getMillis()/1000 - doc[\"firstTime\"].date.getMillis()/1000"
}
}
}