To add a label to a node based on a property, there are two steps:
- Add the label to the node
- Remove the property
For example, should we want to set a hasRestaurant label to towers with a restaurant, the queries would be as follows:
MATCH (t:Tower) WHERE t.hasRestaurantSET t:HasRestaurantREMOVE t.hasRestaurantRETURN t
This also illustrates the need of naming hygiene: HasRestaurant is a label because it starts with a capital letter while hasRestaurant is a property because it starts with a lowercase letter.