作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
假设我有包含以下字段的文档:{field1, field2, ... fieldn}
我需要运行一些查询,其中某些条件需要比较两个或多个字段。像 fieldX = fieldY
在标准 SQL 中,示例可能是:
SELECT * FROM Table1 WHERE farePrice>100 AND originRegion = destinationRegion
我一直在阅读一些文档,看起来“编写脚本”可能是实现此目标的唯一方法?或者还有其他选择吗?
最佳答案
您可以使用脚本过滤器 -
{
"filtered": {
"query": {
"range": {
"farePrice": {
"gt": 100
}
}
},
"filter": {
"script": {
"script": "doc['originRegion'].value == doc['destinationRegion'].value"
}
}
}
}
关于elasticsearch 字段间比较,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27708612/
根据 Android docs ,activity生命周期如下: onCreate() onStart() onResume() onPause() onStop() onDestroy() 问题是,
我有一门类(class)有很多专栏,但这个问题只需要其中三个: ---------------------------------------- | start_date | start_time
给定在同一个 Tomcat 6 上运行的两个 Web 应用程序。如果您从一个应用程序到另一个应用程序进行 http 调用,Tomcat 是否会“短路”此调用,或者它会在调用之前一直在 interweb
我是一名优秀的程序员,十分优秀!