code: private void rebuildNodeIndex(final String entityType) {
  
  		final NodeFactory nodeFactory       = new NodeFactory(SecurityContext.getSuperUserInstance());
  		final DatabaseService graphDb       = (DatabaseService) arguments.get("graphDb");
  		Iterator<AbstractNode> nodeIterator = null;
  
  		nodeIterator = Iterables.map(nodeFactory, graphDb.getNodesByTypeProperty(entityType)).iterator();
  
  		if (entityType == null) {
  
  			info("Node type not set or no entity class found. Starting (re-)indexing all nodes");
  
  		} else {
  
  			info("Starting (re-)indexing all nodes of type {}", entityType);
  		}
  
  		long count = bulkGraphOperation(securityContext, nodeIterator, 1000, "RebuildNodeIndex", new BulkGraphOperation<AbstractNode>() {
  
  			@Override
  			public boolean handleGraphObject(SecurityContext securityContext, AbstractNode node) {
  
  				node.addToIndex();
  
  				return true;
  			}
  
  			@Override
  			public void handleThrowable(SecurityContext securityContext, Throwable t, AbstractNode node) {
  				logger.warn("Unable to index node {}: {}", new Object[]{node, t.getMessage()});
  			}
  
  			@Override
  			public void handleTransactionFailure(SecurityContext securityContext, Throwable t) {
  				logger.warn("Unable to index node: {}", t.getMessage());
  			}
  		});
  
  		info("Done with (re-)indexing {} nodes", count);
  	}
docs: ----- private methods -----