Location > Blog

Create a Site Search Engine in ASP.NET using Lucene.Net

I have been using Lucene.Net for some time now. It is a a useful framework for creating a full text site search. Lucene.Net is a fully featured search solution and is the perfect choice if you require more that just a simple SQL search. 

What is Lucene.Net?

Lucene.Net is a source code, class-per-class, API-per-API and algorithmatic port of the Java Lucene search engine to the C# and .NET platform utilizing Microsoft .NET Framework. 

Lucene.Net Features

  • Results ranked by relevancy.
  • High performance indexing and searching.
  • Many query types including phrase queries, similarity queries, boolean queries, range queries.
  • Boost scores or relevancy depending on the field that is matched.
  • Custom fields.

Getting Started with Lucene.Net

The current stable release at time of writing is 2.004 and can be downloaded from the downloads section of the Lucene.Net site, included in the release is a demo project that shows you how to create an index and search it.

Useful Lucene Resources

  • Lucene Index Toolbox - The indexes created by Lucene.Net are compatible with the indexes created by the Java version. Luke is a handy development and diagnostic tool, Luke accesses already existing Lucene indexes and allows you to display and modify their content. Luke is compatible with indexes created with both the Java and C# version of Lucene.
  • Highlighter.Net - A contributing project used to markup highlighted terms found in the best sections of indexed text. Highlighter.Net is included in the release.

Saturday May 2 2009 07:00 p.m.