Gremlin:多重过滤条件"OR"

Rem*_*oon 5 graph-databases gremlin titan

我想查询我的TITAN 0.4图表,基于两个过滤条件和"OR"逻辑运算符(如果条件为真,则返回顶点).

我在http://sql2gremlin.com/上搜索了这个,但只给出了"AND"运算符,

我的要求如下:

SELECT *
  FROM Products
 WHERE Discontinued = 1
   OR UnitsInStock = 0

g.V('type','product').has('discontinued', true) "OR"
                     .has('unitsInStock', 0)
Run Code Online (Sandbox Code Playgroud)

请帮忙

ste*_*tte 15

你可以这样做:

g.V('type','product').or(_().has('discontinued', true), _().has('unitsInStock', 0))
Run Code Online (Sandbox Code Playgroud)

请参阅GremlinDocs中的步骤或步骤.