Showing results for 
Search instead for 
Did you mean: 

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.

Nodes 2022
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.