「beginAt」属性でエッジ反復の結果を並べ替えようとしていますが、aql コードに従うとうまくいきません。
FOR f IN TRAVERSAL(client, careerEdges, "client/100", "outbound", {paths:true})
let sorted = (
FOR e IN f.path.edges
FILTER e.order <= 3
SORT e.beginAt DESC
RETURN e)
RETURN sorted
'order' 属性も同様です。次のように常に同じシーケンスを返します。
[
[],
[
{
"_id": "careerEdges/240469605275",
"_rev": "240469605275",
"_key": "240469605275",
"_from": "client/100",
"_to": "careers/iniAlt",
"order": 2,
"$label": "noLonger",
"beginAt": "2014-05-10 13:48:00",
"endAt": "2014-07-20 13:48:00"
}
],
[
{
"_id": "careerEdges/240470064027",
"_rev": "240470064027",
"_key": "240470064027",
"_from": "client/100",
"_to": "careers/lidGru",
"order": 3,
"$label": "noLonger",
"beginAt": "2014-07-20 13:48:00",
"endAt": "2014-08-20 13:48:00"
}
],
[
{
"_id": "careerEdges/240469867419",
"_rev": "240469867419",
"_key": "240469867419",
"_from": "client/100",
"_to": "careers/iniEst",
"endAt": null,
"order": 1,
"$label": "noLonger",
"beginAt": "2014-06-10 13:48:00"
}
]
]
私のクエリは正しいですか?