code: public void updateIndex(Set<String> addedNodes, Set<String> removedNodes, Set<String> parentAddedNodes,
        Set<String> parentRemovedNodes)
     {
        // pass lists to search manager 
        if (searchManager != null && (addedNodes.size() > 0 || removedNodes.size() > 0))
        {
           try
           {
              searchManager.updateIndex(removedNodes, addedNodes);
           }
           catch (RepositoryException e)
           {
              log.error("Error indexing changes " + e, e);
           }
           catch (IOException e)
           {
              log.error("Error indexing changes " + e, e);
              try
              {
                 handler.logErrorChanges(removedNodes, addedNodes);
              }
              catch (IOException ioe)
              {
                 log.warn("Exception occure when errorLog writed. Error log is not complete. " + ioe, ioe);
              }
           }
        }
        // pass lists to parent search manager 
        if (parentSearchManager != null && (parentAddedNodes.size() > 0 || parentRemovedNodes.size() > 0))
        {
           try
           {
              parentSearchManager.updateIndex(parentRemovedNodes, parentAddedNodes);
           }
           catch (RepositoryException e)
           {
              log.error("Error indexing changes " + e, e);
           }
           catch (IOException e)
           {
              log.error("Error indexing changes " + e, e);
              try
              {
                 parentHandler.logErrorChanges(parentRemovedNodes, parentAddedNodes);
              }
              catch (IOException ioe)
              {
                 log.warn("Exception occure when errorLog writed. Error log is not complete. " + ioe, ioe);
              }
           }
        }
     }
docs: Flushes lists of added/removed nodes to SearchManagers, starting indexing.
  
  @param addedNodes
  @param removedNodes
  @param parentAddedNodes
  @param parentRemovedNodes