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
gefragt vor 3 Jahren188 Aufrufe
2 Antworten
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
beantwortet vor 3 Jahren
0

Indeed, I made a mistake... Thanks

windox
beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen