[英]Are there any recommendations for integrating Lucene.NET into an ASP.NET MVC application?
I'm wondering if there are any recommendations, best practises or top-tips for integrating a Lucene.NET based search into an ASP.NET MVC web application?我想知道对于将基于 Lucene.NET 的搜索集成到 ASP.NET MVC web 应用程序中是否有任何建议、最佳实践或重要提示?
Things I've read (or think I've read) in various places include the following:我在各个地方读过(或认为我读过)的内容包括以下内容:
IndexWriter
, many IndexReader
sIndexWriter
,多个IndexReader
IndexReader
sIndexReader
s Are there any other useful tips or resources I should read before starting?在开始之前我应该阅读任何其他有用的提示或资源吗?
Thanks,谢谢,
Kieron基龙
Here are my tips (in no particular order):以下是我的建议(排名不分先后):
A few gotchas from one of my previous projects were:我之前的一个项目中的一些问题是:
I would suggest looking at the source code for RavenDb as it is built on top of Lucene and uses a number of best practices.我建议查看 RavenDb 的源代码,因为它构建在 Lucene 之上并使用了许多最佳实践。
RavenDb is definitely the easiest way to go here -- it really is lucene++. RavenDb 绝对是 go 最简单的方法——它真的是 lucene++。
In terms of how to use it, I'd recommend looking at the SubText blogging engine.至于如何使用它,我建议看一下 SubText 博客引擎。 Code is MIT licensed so you can just use it in your project and it has a very well designed index writer/reader.
代码是 MIT 许可的,所以你可以在你的项目中使用它,它有一个设计良好的索引编写器/阅读器。
In our apps, we tend to have one writer and a separate app with many readers.在我们的应用程序中,我们倾向于有一个作家和一个拥有许多读者的独立应用程序。 The locking strategy can be key here--especially make sure the readers don't try and lock the index.
锁定策略在这里可能很关键——尤其是确保读者不要尝试锁定索引。 I'm blanking on the specific term we had to use to make this happen.
我对我们必须用来实现这一点的特定术语表示空白。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.