// file not found or filesize exceeded limit - skip file
continue;
}
}
// try to retrieve filehandler
FileHandler handler = retrieveFileHandler(filename);
if (handler == null) {
_core.getLog().info("No filehandler found for file " + filename + " of content " + content.getContentKey().toString() + " from db " + db.getDbReference() + ".");
continue;
} else {
// parse text from file
InputStream is = content.getFileData(filename);
if (is != null) {
String text = null;
try {
handler.parse(is);
text = handler.getText();
} catch (FileHandlerException e) {
_core.getLog().error("Unable to extract text from file '" + filename + "' of content '" + content.getContentKey().toString() + "' using filehandler '" + handler.getClass().getName() + "'.", e);
}
if (text != null) {
// index file text
_core.getLog().info("Indexing file " +filename + " of content " + content.getContentKey().toString() + " from db " + db.getDbReference() + ".");
addUnStored(document, INDEXFIELD_ALLATTACHMENTS, text, rule.getBoost());