作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想访问图像中的航类数组并获取 10 x 10 的记录。我通过映射航类数组尝试了不同的方法。
这是我在 postman 中尝试过的
PUT http://12.234.17.134:9200/index-flights
{
"mappings": {
"properties": {
"flights": {
"type": "nested"
}
}
}
}
GET http://12.234.17.134:9200/index-flights/_search
{
"query": {
"match": {
"result.id": "2erfc096-3db0-4817-88fc-69db286e95b8"
},
"query": {
"nested": {
"path": "flights"
}
}
}
}
我的数据结构的图像
最佳答案
使用 _id
查询——不需要嵌套的(如果格式错误的话):
{
"query": {
"terms": {
"_id": [
"2erfc096-3db0-4817-88fc-69db286e95b8"
]
}
}
}
或者
{
"query": {
"ids": {
"values": [
"2erfc096-3db0-4817-88fc-69db286e95b8"
]
}
}
}
提示:切勿在在线论坛中共享公共(public)集群 IP。
关于elasticsearch - 谁能帮我从 Elasticsearch 中查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63307291/
嗨,我是第一次玩 Pig,我很好奇如何处理将一个字段拆分成多个其他字段。 我有一个包,A,如下图: grunt> Dump A; (text, text, Mon Mar 07 12:00:00 CD
如何添加架构中未定义的固定字段(例如日期或月份)?我运行了以下 pig 脚本以将固定日期添加到我的结果表中,并收到以下错误消息:Invalid field projection。方案中不存在投影字段
我是一名优秀的程序员,十分优秀!