Lucene is an Information Retrieval System used for full-text searching and scoring results commonly referred to as a search engine (similar to google-type-searching). LINQ is Microsoft's extensible Language Integrated Query platform
that provides querying directly in a managed CLR. LINQ comes out of the box with
LINQ to Objects, LINQ to DataSets, LINQ to XML, LINQ to SQL and
LINQ to Entities. The goal of LINQ to Lucene is to provide developers with the ability to enjoy full-text searching using a fast-proven search-engine within the .Net managed CLR. The plan is to get the
LINQ to Lucene code-base pushed up to CodePlex for additional developers to generate feed-back and improve and enhance.
Since the format of Lucene, which stores its data in an Index as Documents with fields, the project will be capable of mapping custom business object types, a kind of Object-Index-Mapper (OIM) similar to the typical Object-Relational-Mapper (ORM) that
LINQ to SQL provides. LINQ to Lucene uses attributes and reflection on classes to be indexed and their members, similar to the Table and Column decorators for SQL mapped objects. Types can easily support
LINQ to SQL decorations for a larger number of members while co-supporting
LINQ to Lucene decorations for the few members that support it. Classes stored in the lucene index are decorated with the
[Document] attribute and its properties are decorated with the
Similar to the DataContext object, there is an IndexContext class that manages querying, retrieval and mapping of objects to the appropriate index as well as writing the Index. Early releases of this will treat the index as though it is a read-only item, but
the IndexContext object will eventually provide a facility for tracking changes and persisting those to the index with a familiar
SubmitChanges() method. The implementation is being designed to support the generation of an Expression Tree that can be analyzed and converted into a Lucene query and ultimately executed against the index on first request
following the same pattern that LINQ to SQL uses allowing for rich query generation.
The project is built using Test Driven Development with the Visual Studio 2010 Test Projects.
The source code is written in C# 3.0 using the Lucene.Net port version 2.9.4.