There are nodes with 3 different types of Properties, "Male", "Female", "Male, Female". When query something like "match (n:label) where "Male" in n.Gender return n" can I get nodes with Properties having "Male" and "Male, Female" as the query gives nodes with "Male" as the property.
Well the nodes has a property called "Gender" that could have 3 different values "Male", "Female", "Male,Female"(I'm attaching few example images below)
Is it possible to query the nodes which are having Gender property as "Male" and "Male,Female", I don't want nodes having the Gender property as Female.
Thanks for the reply well the word "female" has the word "male" in it so I'm getting all the nodes, like nodes having their Gender property as "Male", "Female","Male,Female".
Oh yeah true, my bad
I don't see a good way of doing it with these valued, is it possible to replace female gender by F the male value by M? It will be easier.
Try this:
MATCH (a) where a.Gender contains("Male")
should return nodes with ids: 528 and 546
MATCH (a) where a.Gender contains("Female")
should return nodes with ids: 540 and 546
You could also set the Gender property to a list, instead of the concatenation of the two genders. Then you can use list predicates, such as "Male" in a.Gender or not "Male" in a.Gender. If you want the nodes that contain both, you can use size(a.Gender) = 2.