简体   繁体   English

Lucene.net文件夹搜索

[英]Lucene.net folder search

I am newbie in Lucene.net. 我是Lucene.net的新手。 I want to search a content from the folder which may have all type of files (.txt, .xls, .pdf, .exe, .ppt, .doc,...). 我想从可能具有所有类型文件(.txt,.xls,.pdf,.exe,.ppt,.doc等)的文件夹中搜索内容。

Suppose if I search any content, I want to list the filepath & content matched (it should be highlighted) inside the file if any. 假设我搜索任何内容,我想列出文件内匹配的文件路径和内容(应突出显示)。

Any sample code would be appreciated. 任何示例代码将不胜感激。

Note : I am want to use this result in C# class library. 注意:我想在C#类库中使用此结果。

I haven't used it myself, but you should look into using SOLR. 我自己没有使用过,但是您应该研究使用SOLR。 AFAIK you cannot host it on a .NET server, but you can connect to it from .NET using solrSHARP . AFAIK您不能将其托管在.NET服务器上,但是可以使用solrSHARP从.NET连接到它。

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

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