How to effectively check the existence of an edge

0

How to effectively check the existence of an edge? I tried using a query of this type:
g.V(srcId).out(edgeName).has(dstId).hasNext()
But after checking the performance, I realized that this is not an efficient query (it takes about 0.1-0.3 seconds) while extracting edges takes ~0.02

windox
已提問 3 年前檢視次數 188 次
2 個答案
0

I don't think this is a correct query. "has(dstId)" seems wrong, see https://tinkerpop.apache.org/docs/3.5.0/reference/#has-step . Perhaps you meant "hasId(dstId)"?

AWS
已回答 3 年前
0

Indeed, I made a mistake... Thanks

windox
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南