Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
参考以下链接,我只能搜索单个 pdf 文件的内容,但我的要求是搜索多个 pdf 文件内容,请建议我如何做到这一点。
PDF中的简单单词搜索
该示例提供了使用以下内容创建准备索引的对象:
File pdfFile = new File("src/resources/SamplePDF.pdf"); IndexItem pdfIndexItem = index(pdfFile);
并且,一旦它创建了一个Indexer,将它们添加到索引中:
Indexer
indexer.index(pdfIndexItem);
我想您可以对其他文件遵循相同的模式。