feat: There is no way the, 优化ES 坑

This commit is contained in:
super_liu
2022-05-01 13:01:42 +08:00
parent 1be6fa6579
commit eee8b90148
@@ -2979,16 +2979,19 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
XWPFWordExtractor extractor = new XWPFWordExtractor(doc);
String txt = extractor.getText();
content.append(txt);
extractor.close();
}else {
WordExtractor wordExtractor = new WordExtractor(fis);
String txt = wordExtractor.getText();
content.append(txt);
wordExtractor.close();
}
} else {
OPCPackage opcPackage = XWPFDocument.openPackage(readFilePath);
XWPFWordExtractor extractor = new XWPFWordExtractor(opcPackage);
String txt = extractor.getText();
content.append(txt);
opcPackage.close();
}
} else {
PDDocument document = PDDocument.load(new File(readFilePath));
@@ -3000,6 +3003,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
String pdfFileInText = tStripper.getText(document);
// String[] lines = pdfFileInText.split("\\r?\\n");
content.append(pdfFileInText);
document.close();
}
}
} catch (Exception e) {