Faceted Searching with Lucene.net and LION

by Jon Davis 6. May 2008 21:06

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).

Currently rated 1.2 by 5 people

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

Tags: , , , ,

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading




 

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Jon Davis (aka "stimpy77") 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.
 
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."

Jon was previously employed as a senior .NET developer at a very well-known Internet services company whom you're more likely than not to have directly done business with. However, this blog and all of jondavis.net have no affiliation with, and are not representative of, his former employer in any way.

Contact Me 


Tag cloud

Calendar

<<  October 2020  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar