Friday, September 30, 2011

Luke + Lucene 3.4.0

Ugh. It seems like every time Lucene gets updated lately something breaks. They've been making lots of API changes lately and if it's not a backward compatibility issue within Lucene itself, it's something else that depends on Lucene.

After rebuilding our indexes with Lucene 3.4.0 we discovered that we could no longer open them with Luke. All we'd get was a super helpful "unknown format version -3". This happens even when the index is built on 3.4.0 with an older Version flag.

And we're not the only ones: Issue 46 and Issue 47.

So... Yay for open source. Here's a working version of Luke for Lucene 3.4.0: lukeall-3.4.0.jar.

Here's a patch for the Luke 3.3.0 branch if you wish to build it yourself: lucene-3.4.0-support.patch. You'll need to replace all the lucene 3.3.0 libraries with matching ones from lucene 3.4.0.

On a side note, after using github it feels so... archaic to be using something else. It would have been so much simpler for me to share this if I could've just forked it.