queueForIndexing(doc, pd);
queueForIndexing(doc, false, pd);
    public synchronized Document addDocumentRevision(OperationContext octxt, Document doc, byte[] rawData, String author) throws ServiceException {        String digest = ByteUtil.getDigest(rawData);        StoreManager sm = StoreManager.getInstance();        Blob blob = null;        boolean success = false;        try {            AddDocumentRevision redoRecorder = new AddDocumentRevision(mId, digest, rawData.length, 0);            beginTransaction("addDocumentRevision", octxt, redoRecorder);            redoRecorder.setAuthor(author);            redoRecorder.setDocument(doc);            short volumeId = Volume.getCurrentMessageVolume().getId();            blob = sm.storeIncoming(rawData, digest, null, volumeId);            redoRecorder.setMessageBodyInfo(rawData, blob.getPath(), blob.getVolumeId());            markOtherItemDirty(blob);            ParsedDocument pd = new ParsedDocument(rawData, digest, doc.getName(), doc.getContentType(), getOperationTimestampMillis());            doc.addRevision(author, pd);            queueForIndexing(doc, pd);            sm.link(blob, this, doc.getId(), doc.getLastRevision().getRevId(), volumeId);            doc.purgeOldRevisions(1);  // purge all but 1 revisions.            success = true;        } catch (IOException ioe) {            throw MailServiceException.MESSAGE_PARSE_ERROR(ioe);        } finally {            endTransaction(success);            if (blob != null)                try {                    sm.delete(blob);                } catch (IOException ioe) {//                  no harm done                }        }        return doc;    }