对于给定的顶点,我可以找到一个属性是否myproperty
包含单个substring substring1
,如下所示:
g.V(993280096)
.filter({it.get().value("myproperty").contains("substring1")})
如何扩展它以在同一查询中搜索多个子字符串?
类似于以下内容:
g.V(993280096)
.filter({ it.get().value("myproperty")
.contains(or("substring1", "substring2"))})
有没有更好的方法来代替使用 lambda 表达式?请注意,我不想使用内置的图形数据库(在我的情况下为 JanusGraph),因为我使用的是 gremlin-python。