我正在使用AWS Neptune gremlin,我的一个顶点的属性存储了多个值
具有属性颜色的顶点标签'apple',例如创建了一个“ apple”顶点,其属性颜色为多个值['red','white']
g.V().hasLabel('apple').has('color', TextP.notContaining('wh'))
问题是它仍然返回此顶点,如何排除包含'wh'的V?
您可以使用not
步骤执行此操作:
g.V().hasLabel('apple').not(has('color', containing('wh')))
您的查询过滤所有不包含'wh'的颜色值的顶点
使用not
和containing
,您可以过滤一个或多个值包含'wh'。