简体   繁体   中英

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.

Simple word search in 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.index(pdfIndexItem);

I would suppose you can follow the same pattern for additional files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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