implemented function to add nodes and relationships to indexes