Faceted Searching with Lucene.net and LION

by Jon 5/6/2008 2:06:00 PM

Two or three months ago I noted that I was planning on adding a nifty new QueryBuilder object as well as add new faceted searching support.

http://www.jondavis.net/blog/post/2008/02/LION-Searching%2c-AJAX-Coding-
With-jQuery-and-ASMX%2c-Jaxer-Tinkering%2c-and-COD4-Gaming.aspx

Um, well, we got sidetracked. But the need continued to haunt us, and a co-worker stumbled upon this:

http://markmail.org/message/hyetqvex7bqnshek#query:facet%20search%20
lucene.net+page:1+mid:zrew4dimoktd6vex+state:results

.. which included a sample source file (SimpleFacets.cs) that proved to be a workable solution for us. (Wow. That was easy.)

I have reached the next major milestone for our project for

  • my pretty QueryBuilder object
  • faceted searching on a particular set of fields (my query can optionally specify specific values for facet counting rather than rely on the top scrape)
  • faceted searching on a named subquery (likely very slow [untested] but very powerful)

.. and that milestone is writing the code and making sure that the old application code still runs! I haven't even tested it yet. No, I didn't do TDD, shame, shame, shame!! Problem is, there's just so much code already that is not already bound to TDD unit tests that to refactor for NUnit or VSTS I'll have to really dedicate some time to make it worthwhile to form up a pattern .. and time is something I'm short on here. Then again, I don't have enough time NOT to write tests before writing code, so I'm feeling pretty lame right now.

That said, I did ask my boss a couple months ago if it was okay with him if I could open source LION (Lucene Indexing On .NET), he doesn't have a problem with it, and I'd like more hands in the pot. Everyone at the office is just too dang busy, and when they see it all they can say is, "Wow, that's a lot of code, I thought it was just Lucene.net API calls, you have WCF providers and query wrappers and document structure base classes and everything..." They don't exactly say that with appreciation; they want small chunks of throw-away code scattered everywhere. I have tried to make LION support that, too, but I don't write my implementation code that way so that's not what they see when I show it to them.

Anyway, now that faceting is partially implemented (fully written but untested, bleah) after I write some tests up and debug and everything works as it should I'm going to fork off the core projects and refactor and rename things and then open-source the whole thing. I'm trying to go in the direction of Lucene Solr on this in terms of front-end feature set, but there's a lot of re-thinking and refactoring to do on the service side to ever call it "enterprise class", our needs have been mostly met but others might be able to contribute to the project to help it meet their own custom needs (and hopefully with minimal tweaks).

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

7/23/2008 11:24:43 AM


 

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About the author

Jon Davis Jon Davis (aka "stimpy77") is a software and web developer by day and a software and web enthusiast (geek) by night. He was recently a senior web engineer for the enthusiast division of a major magazine publishing company for nearly two years. He has been a programmer, developer, and consultant for web and Windows software solutions professionally since 1997, with experience ranging from OS and hardware support to DHTML programming to IIS/ASP web apps to Java network programming to Visual Basic applications to C# desktop apps. Lately, Jon's professional focus has been on C#, ASP.NET, Windows services, WCF, custom Javascript libraries, and implementations of Lucene.net and telligent's Community Server for multiple web sites.
 
Software in all forms is also his sole hobby, whether playing PC games or tinkering with programming them. "I was playing Defender on the Commodore 64," he reminisces, "when I decided at the age of 12 or so that I want to be a computer programmer when I grow up."

E-mail me Send mail

Calendar

<<  July 2008  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

Pages

    Recent posts

    Recent comments

    Authors

    Tags

    Blogroll

    Download OPML file OPML

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    Sign in