for (final Attachment attachment: body.getAllAttachments()) {
final DataHandler handler = attachment.getDataHandler();
if (handler != null) {
final String source = handler.getName();
final LuceneDocumentMetadata metadata = new LuceneDocumentMetadata()
.withSource(source)
.withField("modified", Date.class);
final Document document = extractor.extract(handler.getInputStream(), metadata);
if (document != null) {