我有一组包含日期字段“日期”的餐点。我想查询特定日期范围内的所有餐点。我努力构建一个 FQL 查询,该查询返回整个文档,以便在用户生成的函数中使用,以便在 GraphQL 查询中使用。
我有的:
索引'mealsByDate':
{
name: "mealsByDate",
unique: false,
serialized: true,
source: "Meal",
terms: [],
values: [
{
field: ["data", "date"]
},
{
field: ["ref"]
}
]
}
询问:
Paginate(Range(Match(Index("mealsByDate")), Date("2019-12-30"), Date("2020-01-05")))
结果:
{
"data": [
[
Date("2019-12-30"),
Ref(Collection("Meal"), "253389516394463764")
],
[
Date("2019-12-30"),
Ref(Collection("Meal"), "253389626235945490")
],
[
Date("2020-01-05"),
Ref(Collection("Meal"), "253389653063762452")
]
]
}
如何在结果集中获取 refs 的文档?我尝试将 Paginate 函数放入 Map 函数并应用执行 Get 的 Lambda,但我无法在结果中选择 ref。还是整个方法有缺陷?