Groovy Gremlin-如何在将属性转换为整数时进行筛选?

Groovy Gremlin-如何在将属性转换为整数时进行筛选?,groovy,gremlin,rexster,Groovy,Gremlin,Rexster,我有以下一段小精灵代码: vert.as('x'). both.or( _().has("time").filter{ _()["time"] > startTime.toInteger() }, _().has("isRead"), _().has("isWrite")).dedup{}.gather.scatter. store(y).loop('x'){c++ < limit.toInteger()}.iterate(); vert.as('x')。 两者都有( _(

我有以下一段小精灵代码:

vert.as('x').
both.or(
  _().has("time").filter{ _()["time"] > startTime.toInteger() },
  _().has("isRead"), _().has("isWrite")).dedup{}.gather.scatter.
store(y).loop('x'){c++ < limit.toInteger()}.iterate();
vert.as('x')。
两者都有(
_().has(“time”).filter{{{u()[“time”]>startTime.toInteger()},
_().has(“isRead”),().has(“isWrite”).dedup{}.gather.scatter。
store(y).loop('x'){c++

我认为这将过滤掉时间属性值解析为大于startTime的项。但事实并非如此。如何获取管道中当前对象的时间以进行比较?

事实上,我很快就找到了答案。我应该知道,因为我已经基本上阅读了所有的小精灵文档…:/

vert.as('x').
both.or(
  _().has("time").filter{ it.time > startTime.toInteger() },
  _().has("isRead"), _().has("isWrite")).dedup{}.gather.scatter.
store(y).loop('x'){c++ < limit.toInteger()}.iterate();
vert.as('x')。
两者都有(
_().has(“time”).filter{it.time>startTime.toInteger()},
_().has(“isRead”),().has(“isWrite”).dedup{}.gather.scatter。
store(y).loop('x'){c++
请注意,
it.time
非常慢。对于生产使用,请执行
it.getProperty('time')