简体   繁体   English

如何在Java中使用Lucene进行内容搜索多个pdf文件

[英]How to do content search for multiple pdf files using lucene in java

with the reference of the following link i can able to search the contents of only single pdf file, but my requirement is to search multiple pdf files content please suggest me how to do that. 使用以下链接的参考,我只能搜索单个pdf文件的内容,但是我的要求是搜索多个pdf文件的内容,请建议我该怎么做。

Simple word search in PDF PDF中的简单单词搜索

The example provided create objects ready to index using this: 提供的示例创建了准备使用此方法建立索引的对象:

File pdfFile = new File("src/resources/SamplePDF.pdf");
IndexItem pdfIndexItem = index(pdfFile);

And, once it has created an Indexer , adds them to the index with: 并且,一旦创建了Indexer ,就可以使用以下命令将它们添加到索引中:

indexer.index(pdfIndexItem);

I would suppose you can follow the same pattern for additional files. 我想您可以为其他文件遵循相同的模式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM