Lucene.Net Index all files in a folder

不羁岁月 提交于 2019-12-11 11:56:38

问题


Is there a way to index all files in a specific folder? Refer to a folder, and somehow add all the documents in the folder to the index without having to loop through all the files in the folder. In DtSearch, there was a method to "IndexFilesInFolder(foldername)"


回答1:


There's a demo directory in the Lucene.Net source which includes examples how to index all files in a folder, and searches the index. It works for basic text documents, you'll need to handle other document types to extract their content.



来源:https://stackoverflow.com/questions/13746766/lucene-net-index-all-files-in-a-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!