Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-09-2022 03:07 AM
Hi I'm completely new to the graph db so probably not very difficult question, but would appreciate if someone can help me with the following:
i have a node labeled X with property "Tags" with the value of
[
{"key": "Name", "Value": "someName"},
{"Key": "Owner" , "Value": "someOwner"}
]
the tag owner it isn't always present
is there a way that i can match all nodes X with the tag "Owner" not being "someOwner" or if it tag "Owner" doesn't exist?
02-09-2022 08:36 AM
How are you setting that value to a property? I though Neo4j only supports primitive values or arrays of the same.
Can you just store these values as independent properties, such as:
Create(n:X {Name: "someName", Owner: "someOwner"})
If so, it would be easy to find nodes where Owner being null or not equalling "someOwner"
02-09-2022 03:29 PM
to add to @glilienfield approach, at this time Neo4j does no support indexing of arrays/maps etc. So if you record the value as-is from the original post then we wouldnt be able to use an index to improve performance. @glilienfield answer would allow one to index said properties
All the sessions of the conference are now available online