private void removeFromIndexes(Relationship relationship) { final IndexManager indexManager = delegate.index(); for (String indexName : indexManager.relationshipIndexNames()) { RelationshipIndex relationshipIndex = indexManager.forRelationships(indexName); if (relationshipIndex.isWriteable()) relationshipIndex.remove(relationship); } }
public void removeFromRelationshipIndexNoKeyValue(String indexName, long id) { RelationshipIndex index = graphDb.index().forRelationships(indexName); Transaction tx = graphDb.beginTx(); try { index.remove(graphDb.getRelationshipById(id)); tx.success(); } finally { tx.finish(); } }