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. or Just normal Full Text Indexing.
Size of my database is around开发者_如何学编程 8000 Companies Records. 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
We use Lucene within our eCommerce platform and we're 100% satisfied with it. 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:
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).
Once user queries got more complex (e.g. 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).
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. 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.
P.S. Here is an example of using spell checker for Lucene: “Did you mean?” feature in Lucene.net.
精彩评论