[英]Gremlin - How do find vertices with 'null' property?
假設我有label
reviewer
和property
name
vertices
。
我可以用以下方式查詢'John Smith':
g.V().hasLabel('reviewer').has('name', eq('John Smith'))
但我不能用以下方法查詢null'name':
g.V().hasLabel('reviewer').has('name', eq(null))
盡管審閱者具有null
名稱(即未設置屬性name
reviewer
,但上述內容對我來說仍為null
。
那么查找具有null
屬性的頂點的gremlin查詢是什么?
我想知道你是否可能在不同的Graph
實現上獲得不同的行為,但是在TinkerGraph上你可以這樣做:
gremlin> g.V().hasLabel('reviewer').hasNot('name')
==>v[0]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.