Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 1: replicate users.

How to use match function in python when the targeted matching 'property' is a list?


I create a node, the node name is robot, the robots has a property, which is called 'capabilities'. For the capabilities, there is a list of all the capabilities for the robot. For example, the robot in the picture below has a capability lists, [Moving,ForceApplying].

Now I want to use matcher.match command in Py2neo to search for the robot node with specific capability. If the capability I am searching for is Moving. Then how do I write the code? Below is the code I write, but doesn't work,

a = matcher.match('Robot', capabilities = 'Moving').first()



I think that's not expressible (yet) with py2neo matchers, it seems that list properties are not yet supported for ` WHERE $value in node.capabilities`

In your model it might also make more sense to pull out those capabilities as extra nodes and link the robot to them.