0
votes

I have a network of nodes and relationships in Neo4j, (4039 nodes and 178000 relationships). I was playing around with the data, however, it seemed to me, I could not access any node by their particular property

When I created the nodes, the create statements were something like this,

create(n:PERSON{userid:6, `1`:1, `53`:53, `55`:55, `62`:62, `78`:78, `111`:111, `127`:127, `157`:157, `157`:157});

The properties were common for a lot of nodes, lets say, property 55 with value 55 is common for atleast 50 nodes. But if I am trying to retrieve them, using this cypher query

match (n:PERSON {`55`: {55}}) return n;

It is giving me an error of Expected a parameter named 55.

1
Why would you ever use numeric values as property-names?Michael Hunger
Right. A very good question. The reason I used numerical values is because it is easier to program dynamically(while creating query statements) and the property values can be easily referenced with a document which i have omnipresent to match the numerical values to the actual attributes.Saurav Mukherjee
I know, there might be a better way present, but I am very new to Neo4j and that's what made maximum sense at the moment.Saurav Mukherjee
@Michael I have since then changed all the property keys. Now none of them are numeric anymore.Saurav Mukherjee

1 Answers

0
votes

The problem lay with the curly braces, I deleted one pair of curly braces and added the properties inside the second layer, it works now. The code looks something like this.

match (n:PERSON {`55`: 55}) return n;