code: protected void doUpdateIndex(Set<String> removedNodes, Set<String> addedNodes, Set<String> parentRemovedNodes,
        Set<String> parentAddedNodes)
     {
        ChangesHolder changes = searchManager.getChanges(removedNodes, addedNodes);
        ChangesHolder parentChanges = parentSearchManager.getChanges(parentRemovedNodes, parentAddedNodes);
  
        if (changes == null && parentChanges == null)
        {
           return;
        }
  
        try
        {
           doUpdateIndex(new ChangesFilterListsWrapper(changes, parentChanges));
        }
        catch (RuntimeException e)
        {
           if (isTXAware())
           {
              // The indexing is part of the global tx so the error needs to be thrown to
              // allow to roll back other resources
              throw e;
           }
           getLogger().error(e.getLocalizedMessage(), e);
           logErrorChanges(handler, removedNodes, addedNodes);
           logErrorChanges(parentHandler, parentRemovedNodes, parentAddedNodes);
        }
     }
docs: Update index.
  @param removedNodes
  @param addedNodes