prassee
prassee

Reputation: 3629

how to find a particular node in Neo4j

how to find the particular node using the Neo4j API.When i refereed the docs i got some code to get all nodes However if i have a node called "XYZ" I would like to know how to obtain ONLY that particular node.

Upvotes: 5

Views: 5166

Answers (2)

Eran.G
Eran.G

Reputation: 99

If your node type is a FirstName and its ID is "XYZ" you can do it with:

MATCH(n:FirstName {ID: 'XYZ'}) return n

this will return all the nodes with ID = "XYZ"

Upvotes: 0

dogbane
dogbane

Reputation: 274592

Take a look at the Indexing Service which will allow you to index your nodes with key-value pairs. Once you've indexed your nodes you can query the graph and retrieve nodes which match a given key-value.

Upvotes: 6

Related Questions