Reputation: 358
I read the method here to create the label of node through embedded Java Api. But in my problem the label is dynamic because of correction. So, is there a way to change the label?
Without this facility the alternate solution I have thought is to create nodes of 'labels' and create edge from entity node to that 'label' node. But this may lead to some disadvantages as not able to make use of index over the label.
Upvotes: 1
Views: 501
Reputation: 2663
You can remove labels from nodes using:
node.removeLabel(DynamicLabel.label("MyLabel"));
And you can find all the nodes with the incorrect label using the global operations:
GlobalGraphOperations.at(graphDB).getAllNodesWithLabel( DynamicLabel.label("MyLabel") );
Upvotes: 2