synchronized public void indexNote(Mailbox mbox, IndexItem redo, int mailItemId, Note note)
synchronized public void indexNote(Mailbox mbox, IndexItem redo, boolean deleteFirst, int mailItemId, Note note)
    synchronized public void indexNote(Mailbox mbox, IndexItem redo, int mailItemId, Note note)    throws ServiceException {        initAnalyzer(mbox);        mLog.info("indexNote("+note+")");        try {            String toIndex = note.getContent();            if (mLog.isDebugEnabled()) {                mLog.debug("Note value=\""+toIndex+"\"");            }            try {                deleteDocuments(new int[] { mailItemId });            } catch(IOException e) {                mLog.debug("indexNote ignored IOException deleting documents (index does not exist yet)");            }            Document doc = new Document();            doc.add(Field.UnStored(LuceneFields.L_CONTENT, toIndex));            String subj = toIndex.toLowerCase();            String name = (subj != null && subj.length() > DbMailItem.MAX_SENDER_LENGTH ? subj.substring(0, DbMailItem.MAX_SENDER_LENGTH) : subj);            doc.add(Field.UnStored(LuceneFields.L_H_SUBJECT, subj));            doc.add(Field.Keyword(LuceneFields.L_MAILBOX_BLOB_ID, Integer.toString(mailItemId)));            doc.add(Field.Text(LuceneFields.L_PARTNAME, LuceneFields.L_PARTNAME_NOTE));            doc.add(new Field(LuceneFields.L_SORT_SUBJECT, subj.toUpperCase(), true/*store*/, true/*index*/, false /*token*/));            doc.add(new Field(LuceneFields.L_SORT_NAME, name.toUpperCase(), false/*store*/, true/*index*/, false /*token*/));//          String dateString = DateField.timeToString(note.getDate());//          mLog.debug("Note date is: "+dateString);//          doc.add(Field.Text(LuceneFields.L_DATE, dateString));            addDocument(redo, doc, mailItemId, note.getDate(), false);        } catch (IOException e) {            throw ServiceException.FAILURE("indexNote caught IOException", e);        }    }    