synchronized public void reIndexItem(Mailbox mbox, int msgId, byte type) throws ServiceException
synchronized public void reIndexItem(Mailbox mbox, int msgId, byte type, boolean deleteFirst) throws ServiceException
    synchronized public void reIndexItem(Mailbox mbox, int msgId, byte type) throws ServiceException    {        initAnalyzer(mbox);                MailItem item = null;        try {            item = mbox.getItemById(null, msgId, type);            ParsedMessage pm = null;            if (item instanceof Message) {                Message msg = (Message)item;                // force the pm's received-date to be the correct one                long msgDate = item.getDate();                pm = new ParsedMessage(msg.getMimeMessage(), msgDate, mbox.attachmentsIndexingEnabled());                // because of bug 8263, we sometimes have fragments that are incorrect:                // check them here and correct them if necessary                if (pm.getFragment().compareTo(msg.getFragment()) != 0) {                    mbox.reanalyze(msg.getId(), msg.getType(),  pm);                }                item.reindex(null, pm);            } else if (item.getType() == MailItem.TYPE_DOCUMENT || item.getType() == MailItem.TYPE_WIKI) {            	com.zimbra.cs.mailbox.Document doc = (com.zimbra.cs.mailbox.Document) item;            	try {                	byte[] buf = ByteUtil.getContent(doc.getRawDocument(), 0);            		ParsedDocument pd = new ParsedDocument(buf, doc.getDigest(), doc.getName(), doc.getContentType(), doc.getChangeDate());                	item.reindex(null, pd);            	} catch (IOException ioe) {            		throw ServiceException.FAILURE("reIndexItem caught IOException", ioe);            	}            } else {                item.reindex(null, null);            }        } catch (java.lang.RuntimeException e) {            throw ServiceException.FAILURE("Error re-indexing message "+msgId, e);        }    }    