我的用户顶点具有传入的通知边缘,如下所示:
代码用于获取通知
g.v(17929472).outE('Notification')
我得到的回应:
{
"success": true,
"results": [
{
"Type": "UserReaction",
"PostedDate": "2016-04-15T09:03:42.8391677Z",
"NotificationInitiatedByVertexId": "2304",
"_id": "c7bb4-aoagw-sgl-aoao0",
"_type": "edge",
"_outV": 17929472,
"_inV": 17929728,
"_label": "Notification"
}
],
"version": "2.5.0",
"queryTime": 15.310751
}
每当用户查看通知时,我都会保存上次查看的日期,并希望使用该日期获取该日期之后的所有通知。
我试过了:
g.v((5124096).outE).outE.has('PostedDate',T.gte, 2016-04-15T07:52:31.6979843Z).inV
但它给出了错误。
答案 0 :(得分:3)
PostedDate
似乎以字符串形式返回。请考虑将架构定义中的PostedDate
定义为Long
,然后与T.gte
值进行Long
比较。