Skip to content

Cypher - Where clause on internal id #3448

Closed Answered by andyfengHKU
fedehann asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @fedehann, normally we don't wanna expose internal id for external querying.

But you can query if with

MATCH(n) where label(n)=<label_name> AND offset(id(n)) = 0  return n

where label(n) returns label name with STRING type and offset(id(n)) returns offset with INT64 type.

But that seems kind of horrible, and possibly slow.

Yeah it will be slightly slower. But casting can be done fairly quick and will hardly become the bottleneck of a query

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by prrao87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants