悟空,拿我的打狗棒来

我想对嵌套文档中的字段进行运算,获取值后用于过滤

Elasticsearch | 作者 TestCode9 | 发布于2020年09月04日 | 阅读数:864

{
"mappings": {
"_doc": {
"date_detection": false,
"properties": {
"EndDay": {
"type": "integer"
},

"SalesPlans": {
"type": "nested",
"properties": {
"Id": {
"type": "keyword"
},
"SalesDate": {
"format": "yyyy-MM-dd'T'HH:mm:ss",
"type": "date"
}
}
},
"Id": {
"type": "integer"
}
}
}
}
}
我想使用 `SalesDate` 减去 `EndDay` ,获得的值与当前日期对比进行过滤。请问这可以做到吗
已邀请:

FFFrp

赞同来自:

使用Script query写个脚本试试

要回复问题请先登录注册