简体   繁体   English

ASP.NET Building Search,查看Lucene.NET

[英]ASP.NET Building Search, looking at Lucene.NET

I am looking for a search which has this basic search functionaliy 我正在寻找具有此基本搜索功能的搜索

  • Quick Text Search with spell checker and perhaps also "did you mean..." 使用拼写检查器进行快速文本搜索,也许还“您是说...”
  • Facades. 外墙。

So I am looking at Lucene.NET. 所以我在看Lucene.NET。 or Just normal Full Text Indexing. 或只是普通的全文本索引。

Size of my database is around 8000 Companies Records. 我的数据库大小约为8000家公司记录。 Just wondering is Lucene.net worth the hasstle or will I just build the spell checker and Facade search on top of normal SQL Indexed Search 只是想知道Lucene.net是否值得进行麻烦,还是我将在常规SQL索引搜索的基础上构建拼写检查器和Facade搜索

We use Lucene within our eCommerce platform and we're 100% satisfied with it. 我们在电子商务平台中使用Lucene,对此我们100%满意。 Before that we used to have a search functionality that simply queries the database and this solution proved to be unacceptable for a number of reasons: 在此之前,我们曾经拥有仅查询数据库的搜索功能,并且由于多种原因,该解决方案被证明是不可接受的:

  1. It's not so fast so we couldn't imagine of the "Google Instant Search"-like functionality (which we have implemented after migrating to Lucene-based solution). 它并没有那么快,所以我们无法想象类似“ Google Instant Search”的功能(我们已经在迁移到基于Lucene的解决方案之后实现了该功能)。

  2. Once user queries got more complex (eg applying multiple search criterias/filters) it became quite hard to keep the response times relatively small (and the size and complexity of SQL statements raised extremely hight). 一旦用户查询变得更加复杂(例如,应用多个搜索条件/过滤器),就很难将响应时间保持相对较小(并且SQL语句的大小和复杂性会大大提高)。

  3. We introduced our own (or reimplemented existing) ranking algorithms so the search results can "match" with what the user actually meant. 我们引入了自己的(或重新实现的现有)排名算法,因此搜索结果可以与用户的实际含义“匹配”。

I'm not saying that the database-based approach is always bad for such things (most likely it is just a bad design). 我并不是说基于数据库的方法对于这些事情总是不利的(很可能这只是一个糟糕的设计)。

Also I always keep in mind this famous phrase: "Never underestimate an importance of fast". 我也始终牢记这个著名的短语:“永远不要低估快速的重要性”。 You may have 8k records now but you are not sure 100% how your system will evolve over time. 您现在可能有8k记录,但不确定100%系统会随着时间变化。 In a year your customers will ask for more advanced functionality than just free-text search + your database will grow up to millions of records. 在一年之内,您的客户将要求获得比自由文本搜索更多的高级功能,而您的数据库将增长到数百万条记录。 Think of it before you design your search infrastructure because otherwise you'll probably have to rewrite it completely. 在设计搜索基础结构之前,请考虑一下它,因为否则您可能必须完全重写它。

PS Here is an example of using spell checker for Lucene: “Did you mean?” feature in Lucene.net . PS这是为Lucene使用拼写检查器的示例: Lucene.net中的“您的意思是吗?”功能

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

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