code: synchronized void update(final Collection<String> remove, final Collection<Document> add) throws IOException
     {
        if (!online.get())
        {
           doUpdateOffline(remove, add);
        }
        else if (modeHandler.getMode() == IndexerIoMode.READ_WRITE && redoLog != null)
        {
           doUpdateRW(remove, add);
        }
        else
        {
           doUpdateRO(remove, add);
        }
     }
docs: Atomically updates the index by removing some documents and adding
  others.
  
  @param remove
  collection of <code>UUID</code>s that identify documents to
  remove
  @param add
  collection of <code>Document</code>s to add. Some of the
  elements in this collection may be <code>null</code>, to
  indicate that a node could not be indexed successfully.
  @throws IOException
  if an error occurs while updating the index.