elasticsearch - ElasticSearch - [nested] 未能在路径下找到嵌套对象
问题描述
我的 ElasticSearch 查询有问题。我正在尝试在某个特定日期出发,并确认出发。
这是我的模板的一部分:
"mappings" : {
"properties" : {
"dates_depart" : {
"type" : "nested",
"properties": {
"date_depart": {"type": "date"
},
"last_minute": {
"type": "integer"
},
"depart_confirm": {
"type": "integer"
}
}
},
}
}
这是我的查询:
"query": { "nested" : { "path" : "dates_depart", "query" : { "bool" : { "must" : [ { "match" : {"dates_depart.depart_confirme" : 1}}, { "range" : {"dates_departs.date_depart" : {"gte":"07\/11\/2018","lte":"15\/11\/2018","format":"dd\/MM\/yyyy"}} }]}}}}
但我的查询返回这个而不是 8 个结果:
"caused_by":{"type":"illegal_state_exception","reason":"[nested] nested object under path [dates_depart] is not of nested type"}}},"status":400}
我该如何解决?
解决方案
薄...没有考虑到模板的最后一个版本...我只是更正了谢谢。
不幸的是,现在我有一个新的错误。当然链接到我的索引
{"error":{"root_cause":[{"type":"json_e_o_f_exception","reason":"Unexpected end-of-input: expected close marker for Object (start marker at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@67a98c0c; line: 1, column: 1])\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@67a98c0c; line: 1, column: 533]"}],"type":"json_e_o_f_exception","reason":"Unexpected end-of-input: expected close marker for Object (start marker at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@67a98c0c; line: 1, column: 1])\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@67a98c0c; line: 1, column: 533]"},"status":500}
推荐阅读
- u-boot - 什么是 bootaux 命令?
- python - rawpy.Params 中 output_bps 的含义
- java - 是否建议将 Arraylist 转换为 Reactor 的 Flux 用于处理数据?
- google-chrome - 如何在 puppeteer 中获取 (http) 协议版本?
- regex - Nino 正则表达式
- r - 如何创建热图来说明网格差异,以控制发散调色板的中心颜色位置?
- php - SVG 图像生成
- android - 可绘制 xml 中的曲线设计或以编程方式绘制绘制
- javascript - 如何在刻度值中创建具有可变刻度间隔并且刻度值之间具有相同距离的左轴
- java - 如何在java中使用带有条件的比较器