在gremlin中存储和访问日期数据类型的最佳方法是什么

在gremlin中存储和访问日期数据类型的最佳方法是什么,gremlin,Gremlin,我的数据库存储Java日期,我通过毫秒搜索该日期 g.V().has('employeeId','350d').collect({it.property('JoinedOn').value().getTime()}) ==>1471866919024 但当我搜索具有相同毫秒值的JoinedOn时,它显示空结果 g.V().has('employeeId','350d').has('JoinedOn',new Date(1471866919024)) gremlin> 在greml

我的数据库存储Java日期,我通过毫秒搜索该日期

g.V().has('employeeId','350d').collect({it.property('JoinedOn').value().getTime()})
==>1471866919024
但当我搜索具有相同毫秒值的JoinedOn时,它显示空结果

g.V().has('employeeId','350d').has('JoinedOn',new Date(1471866919024))
gremlin>

在gremlin中存储和执行日期对象操作的最佳方法是什么?不清楚为什么不适合您。。。你的图形后端是什么?我刚刚用TinkerGraph和TitanGraph成功地尝试了它,我使用titan和Tinkerpopo创建了这个属性:
log.info(“使用key:JoinedOn创建属性”);final PropertyKey JoinedOn=mgmt.makePropertyKey(“JoinedOn”).dataType(Date.class.make();TitanManagement.IndexBuilder JoinedOnMixedIndexBuilder=mgmt.buildIndex(“byEdgeJoinedOnMixed”,Edge.class).addKey(JoinedOn);TitanGraphIndex JoinedOnEMixedIndex=JoinedOnEMixedIndexBuilder.buildMixedIndex(搜索\后端);log.info(“已完成创建键为JoinedOn的属性”)为什么不将其存储为长时间?从长时间返回转换为日期很容易,但不清楚为什么这对您不起作用。。。你的图形后端是什么?我刚刚用TinkerGraph和TitanGraph成功地尝试了它,我使用titan和Tinkerpopo创建了这个属性:
log.info(“使用key:JoinedOn创建属性”);final PropertyKey JoinedOn=mgmt.makePropertyKey(“JoinedOn”).dataType(Date.class.make();TitanManagement.IndexBuilder JoinedOnMixedIndexBuilder=mgmt.buildIndex(“byEdgeJoinedOnMixed”,Edge.class).addKey(JoinedOn);TitanGraphIndex JoinedOnEMixedIndex=JoinedOnEMixedIndexBuilder.buildMixedIndex(搜索\后端);log.info(“已完成创建键为JoinedOn的属性”)为什么不将其存储为long?将long转换为Date非常简单