code: synchronized int removeAllDocuments(String uuid) throws IOException
     {
        synchronized (updateMonitor)
        {
           //updateInProgress = true;
           indexUpdateMonitor.setUpdateInProgress(true, false);
        }
        int num;
        try
        {
           Term idTerm = new Term(FieldNames.UUID, uuid.toString());
           executeAndLog(new Start(Action.INTERNAL_TRANSACTION));
           num = volatileIndex.removeDocument(idTerm);
           if (num > 0)
           {
              redoLog.append(new DeleteNode(getTransactionId(), uuid));
           }
           for (int i = 0; i < indexes.size(); i++)
           {
              PersistentIndex index = indexes.get(i);
              // only remove documents from registered indexes
              if (indexNames.contains(index.getName()))
              {
                 int removed = index.removeDocument(idTerm);
                 if (removed > 0)
                 {
                    redoLog.append(new DeleteNode(getTransactionId(), uuid));
                 }
                 num += removed;
              }
           }
           executeAndLog(new Commit(getTransactionId()));
        }
        finally
        {
           synchronized (updateMonitor)
           {
              //updateInProgress = false;
              indexUpdateMonitor.setUpdateInProgress(false, false);
              updateMonitor.notifyAll();
              releaseMultiReader();
           }
        }
        return num;
     }
docs: Deletes all documents that match the <code>uuid</code>.
  
  @param uuid
  documents that match this <code>uuid</code> will be deleted.
  @return the number of deleted documents.
  @throws IOException
  if an error occurs while deleting documents.