}
TreeMap<String, Attachment> attachments = msg.getAttachments();
for( String key : attachments.keySet())
{
Attachment attachment = attachments.get(key);
luceneDoc.add(new Field("attachmentFilename", attachment.getFileName(), Field.Store.NO,
Field.Index.TOKENIZED));
luceneDoc.add(new Field("attachmentFilename_ph", attachment.getFileName(), Field.Store.NO,
Field.Index.TOKENIZED));
luceneDoc.add(new Field("attachmentContent", attachment.getContent(), Field.Store.NO, Field.Index.TOKENIZED));
}
for( String tag : msg.getTags())
{
luceneDoc.add(new Field("tags", tag, Field.Store.NO, Field.Index.TOKENIZED));