Referencing these 2 stackoverflow questions:
I have a graph where a number of Nodes are incorrectly in Indexes. I think this happened because Nodes were deleted using Cypher or using the Delete
button on the Webadmin console, without realising that this would NOT also delete the Node from any Indexes that it was in.
The result is that these Nodes are now being returned incorrectly for queries which use those Indexes for the start Nodes.
Is it possible to remove a Node from an Index using Cypher, REST API or the Webadmin console?
Or am I going to have to write some custom Java (I'm using embedded mode) which does something like:
Iterable<Node> offendingNodes;
Iterable<Index<Node>> allIndexes;
for(Node offendingNode : offendingNodes) {
for(Index<Node> index : allIndexes) {
index.remove(offendingNode);
}
}
// Now re-index offendingNodes correctly