[英]Gremlin: Get list of vertices that do not have certain property fields
我想找到至少缺少其中一個屬性的人員列表:Title,DisplayName,FirstName,LastName,Id,Email。
我已經嘗試過以下但是收到錯誤“java.lang.ArrayIndexOutOfBoundsException”
如果我只運行前三行,那么對於那些沒有DisplayName且該屬性為空值的人,我會得到結果,但是Title沒有屬性列。
g.V().hasLabel('people').hasNot('Title')
.or().hasLabel('people').hasNot('DisplayName')
.or().hasLabel('people').hasNot('FirstName')
.or().hasLabel('people').hasNot('LastName')
.or().hasLabel('people').hasNot('Id')
.or().hasLabel('people').hasNot('Email')
你為什么要復雜化查詢? 誰不只是這個:
g.V().hasLabel('people').not(
has('Title').has('DisplayName').
has('FirstName').has('LastName').
has('Id').has('Email'))
然而,我並不是很清楚你的期望是什么(聲明“然而標題沒有屬性欄”有點令人困惑),但是重寫的查詢可能已經幫助你了(如果沒有,那么請提供一些示例數據和預期的結果,總是使得回答與遍歷相關的問題變得容易得多。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.