【发布时间】:2017-01-13 17:50:10
【问题描述】:
我有一个这样的索引:
{
"rentals": {
"aliases": {},
"mappings": {
"rental": {
"properties": {
"address": {
"type": "text"
},
"availability": {
"type": "nested",
"properties": {
"chargeBasis": {
"type": "text"
},
"date": {
"type": "date"
},
"isAvailable": {
"type": "boolean"
},
"rate": {
"type": "double"
}
}
}
}
这是我的用例:
-
我需要搜索具有给定地址的所有“出租”。
- 这很容易并且可以完成
-
我需要获取所有搜索过的“租金”的“可用性”数据; 仅适用于今天的日期。
- 这是我卡住的部分,如何查询所有“出租”的嵌套文档?
【问题讨论】:
标签: elasticsearch nested-documents