I have this query where I am trying to fetch clubs that matches as many tags in an array of tags as it can in order.
So far I have something like this (ClubTags is the array of tags):
WITH c
UNWIND (CASE $ClubTags WHEN then else $ClubTags end) AS tag
MATCH (c)-[r:HAS_TAG]->(t:ClubTag {name:tag})
RETURN c
This matches and returns clubs that match atleast one tag. But I cant seem to make out how I can expand on this to further count r (count of r always returns 1 from within UNWIND). Im guessing UNWIND is not what I should be using here but I am not sure how else I can match against all tags within the array.
edit : The squares in the abouve code are just open close of array that I am using to handle empty clubtags