我在這有來電通知邊緣如下用戶頂點:如何在使用Gremlin的Titan中獲取邊界日期屬性大於上次訪問日期的通知?
代碼正在使用得到通知
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
,但它給錯誤。
您的代碼表明您正在使用TinkerPop 2.x.我強烈建議改用TinkerPop 3+,這是一個更強大的API的完整重寫。 – jbmusso