简体   繁体   English

在ASP.NET中使用Lucene.NET重建索引的最佳方法?

[英]Best way to re-build index using Lucene.NET in ASP.NET?

I am using SimpleLucene and Lucene.NET for search in my ASP.NET Webforms application. 我在ASP.NET Webforms应用程序中使用SimpleLucene和Lucene.NET进行搜索。 Our application is a simple Q and A site and I decided to use Lucene to do dedicated search for questions. 我们的应用程序是一个简单的问答网站,我决定使用Lucene专门搜索问题。 My problem is that everytime new question gets added to the database, I need to re-build Lucene index. 我的问题是,每次将新问题添加到数据库时,我都需要重新构建Lucene索引。 What is the best way to do it? 最好的方法是什么? My understanding is that while index is getting re-built, Lucene search will be non-functional. 我的理解是,当重建索引时,Lucene搜索将无法正常工作。 When site will have millions of questions re-building of index may take long time. 当站点将有数百万个问题时,重建索引可能需要很长时间。 What is the best solution? 最好的解决方案是什么?

我通过创建一个任务并将其添加到队列(按照SimpleLucene网站上的示例)来使其工作。

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

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