private void analyzePart(MPartInfo mpi, MPartInfo mpiBody, TopLevelMessageHandler allTextHandler)
private void analyzePart(MPartInfo mpi, MPartInfo mpiBody, TopLevelMessageHandler allTextHandler, boolean ignoreCalendar)
    private void analyzePart(MPartInfo mpi, MPartInfo mpiBody, TopLevelMessageHandler allTextHandler)    throws MimeHandlerException, ObjectHandlerException, MessagingException, ServiceException {        String ctype = mpi.getContentType();        // ignore multipart "container" parts        if (ctype.startsWith(Mime.CT_MULTIPART_PREFIX))            return;        MimeHandler handler = MimeHandler.getMimeHandler(ctype);        assert(handler != null);        Mime.repairTransferEncoding(mpi.getMimePart());        if (handler.isIndexingEnabled()) {            handler.init(mpi.getMimePart().getDataHandler().getDataSource());            handler.setPartName(mpi.getPartName());            handler.setFilename(mpi.getFilename());            try {                handler.setMessageDigest(getRawDigest());            } catch (MessagingException e) {                throw new MimeHandlerException("unable to get message digest", e);            } catch (IOException e) {                throw new MimeHandlerException("unable to get message digest", e);            }            // remember the first iCalendar attachment            if (miCalendar == null)                miCalendar = handler.getICalendar();            if (mpi == mpiBody ||                    (mIndexAttachments && !DebugConfig.disableIndexingAttachmentsTogether)) {                // add ALL TEXT from EVERY PART to the toplevel body content.                // This is necessary for queries with multiple words -- where                // one word is in the body and one is in a sub-attachment.                //                // If attachment indexing is disabled, then we only add the main body and                // text parts...                allTextHandler.addContent(handler.getContent(), mpi == mpiBody);            }            if (mIndexAttachments && !DebugConfig.disableIndexingAttachmentsSeparately) {                // Each non-text MIME part is also indexed as a separate                // Lucene document.  This is necessary so that we can tell the                // client what parts match if a search matched a particular                // part.                Document doc = handler.getDocument();                if (doc != null) {                    int partSize = mpi.getMimePart().getSize();                    doc.add(Field.Text(LuceneFields.L_SIZE, Integer.toString(partSize)));                    mLuceneDocuments.add(doc);                }            }        }        // make sure we've got the text/calendar handler installed        if (miCalendar == null && ctype.equals(Mime.CT_TEXT_CALENDAR)) {            if (handler.isIndexingEnabled())                ZimbraLog.index.warn("TextCalendarHandler not correctly installed");            try {                String charset = mpi.getContentTypeParameter(Mime.P_CHARSET);                if (charset == null || charset.trim().equals(""))                    charset = Mime.P_CHARSET_DEFAULT;                Reader reader = new InputStreamReader(mpi.getMimePart().getInputStream(), charset);                miCalendar = ZCalendarBuilder.build(reader);            } catch (IOException ioe) {                ZimbraLog.index.warn("error reading text/calendar mime part", ioe);            }        }    }