So in Neo4j if you have various nodes and they have a property with 1 value as follows:
n.stringProp = "something"
Then you can get various nodes that comply with any property within a query list using a MATCH query like
MATCH (n)
WHERE n.stringProp IN ["something", "somethingElse", "etc"]
RETURN n
However if you have nodes with properties that are lists, as follows:
n.stringListProp = ["red", "purple", "green"]
And you want to get nodes that have any 1 or more of the tags in a query list in their list properties then you cannot simply do a query like:
MATCH (n)
WHERE n.stringListProp IN ["red"]
RETURN n
And you also cannot use CONTAINS because that is for substrings. So you cannot do:
MATCH (n)
WHERE n.stringListProp CONTAINS "red"
RETURN n
And you can't loop through them using a FOREACH because FOREACH is only for CREATE, MERGE or DELETE operations. So I think you have to use UNWIND for this type of MATCH query but I'm really not sure how to structure this query.
If anyone knows how to do this can you please help me out?