Thursday, November 25, 2010

Lucandra.NET

Project Description
Lucandra.NET is a Lucene + Cassandra implementation written in C# which is based on the Lucandra (Java) project by Jake Luciani. Apache's Lucene is a high-performance full-text search engine, and Apache's Cassandra is a promising NoSQL database, originally developed by Facebook.
Note: This page is currently under construction and I'm working on the documentation as much as I can as time permits. Not all source code is fully documented, but will be.


About Lucandra.NET


Lucandra.NET originally started off as a direct port of Jake Luciani's "Lucandra" project (https://github.com/tjake/Lucandra), driven by curiosity and the desire to learn a little bit more about the inner workings of Lucene and Cassandra. After completing the port from Java, I realized that this truly is a valid and promising replacement for the traditional file-based segment stores used by Lucene. We decided to use this in one of our production products, so since then I've gone through and re-written/re-factored a lot of the code and tried to squeeze the most out of it that I can in hopes that some other users of Lucene.NET would find it useful. Note that the code no longer directly represents the original Lucandra code as I've kind-of gone my own way with things; so there's a little learning curve if you're hoping on being able to walk into this code with familiarity of Lucandra's code (though some is still similar).

Some things to keep in mind:

  • Lucandra.NET is currently written for Cassandra 0.7-beta3 and Thrift-0.5.0 and will not work (without modification) with versions previous to Cassandra 0.7, and is untested with earlier 0.7 beta releases.

  • Lucandra.NET is built against Lucene.NET 2.9.2.



  • Lucandra.NET is not compatible with Lucandra (Java). This is due to the fact that Lucandra.NET uses a different data model within Cassandra and also that Lucandra uses Java object serialization, which is for obvious reasons not compatible with .NET's serialization.



  • In the current version, it is expected that you will use a ByteOrderedPartitioner as your partitioner in Cassandra. This facilitates wildcard & range queries, sorting, etc.



  • Lucandra (Java) performs hashing on keys stored in Cassandra; Lucandra.NET does not currently do this. This is primarily due to the fact that I do not fully understand the inner-workings of the partitioners in Cassandra and until I have some time to really play with them and see the how the partitioning works across a cluster, this won't be implemented.



  • Read more: Codeplex