Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-20-2022 11:48 AM
I would like to be able to search for the existence of a certain string in ANY of the properties of a given node.
For example, take: match(mynode) where mynode.names contains "Alfred Pennyworth" return mynode
except I want to do this for ALL of the properties. If mynode has a properties "names" "college" "fingers" "thumbtack_weight_in_tons" etc etc, I want to be able to see if ANY of those properties contain the string "Alfred Pennyworth".
Theoretically, if I knew all the properties of every node, I could search them one at a time, but I'm working with a very irregular data set.
Any help?
05-20-2022 12:57 PM
Hello @drf57 and welcome to the Neo4j community
MATCH (n)
WHERE any(k IN keys(n) WHERE n[k] =~ "(?i).*"+"Alfred Pennyworth"+".*")
RETURN n
Regards,
Cobra
All the sessions of the conference are now available online