code: private void doUpdateOffline(final Collection<String> remove, final Collection<Document> add) throws IOException
     {
        SecurityHelper.doPrivilegedIOExceptionAction(new PrivilegedExceptionAction<Object>()
        {
           public Object run() throws Exception
           {
              for (Iterator<String> it = remove.iterator(); it.hasNext();)
              {
                 Term idTerm = new Term(FieldNames.UUID, it.next());
                 offlineIndex.removeDocument(idTerm);
              }
  
              for (Iterator<Document> it = add.iterator(); it.hasNext();)
              {
                 Document doc = it.next();
                 if (doc != null)
                 {
                    offlineIndex.addDocuments(new Document[]{doc});
                    // reset volatile index if needed
                    if (offlineIndex.getRamSizeInBytes() >= handler.getMaxVolatileIndexSize())
                    {
                       offlineIndex.commit();
                    }
                 }
              }
              return null;
           }
        });
     }
docs: Performs indexing while re-indexing is in progress
  
  @param remove
  @param add
  @throws IOException