10

I am a Lucene newbie and I am trying to open a Lucene 4.3 index (which I am creating with my simple Lucene 4.3.1 app) using Luke, but it keeps giving me:

Invalid directory at the location, check console for more information. Last exception: java.lang.IllegalArgumentException: A SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene42' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath.The current classpath supports the following names: [Lucene40, Lucene3x, SimpleText, Appending]

Fine. So I set the Lucene version used in the code to Version.LUCENE_43. I tried earlier 3.x versions as well. What am I doing wrong here? Is there another Lucene index browser one can use?

I am running Luke using java -jar lukeall-4.0.0-ALPHA.jar and I am telling it to open the index which my app is producing.

UPDATE:

  • I have tried setting my CLASSPATH to include lucene-core:4.3.1:jar. That didn't help.

  • Luke throws this error:

    java.lang.IllegalArgumentException: A SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene42' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath.The current classpath supports the following names: [Lucene40, Lucene3x, SimpleText, Appending] java.lang.IllegalArgumentException: A SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene42' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath.The current classpath supports the following names: [Lucene40, Lucene3x, SimpleText, Appending]

Many thanks!

carlspring
  • 31,231
  • 29
  • 115
  • 197
  • Check for jar versions, if the are compatible. – SSaikia_JtheRocker Jul 08 '13 at 20:05
  • Are you using latest version of Luke? Have you tried to add jar with [`Lucene42Codec`](https://lucene.apache.org/core/4_2_0/core/org/apache/lucene/codecs/lucene42/Lucene42Codec.html) to classpath? It looks like your Luke version just doesn't know about newer format that you used for index. – ffriend Jul 08 '13 at 20:08
  • Please, check my comments for an update. – carlspring Jul 08 '13 at 21:52
  • Apparently, this seems to be a bug in Luke. See here for more details: http://code.google.com/p/luke/issues/detail?id=72 . – carlspring Jul 09 '13 at 17:27

3 Answers3

11

After long time searching, I was instructed to look for latest Luke releases here: Opengrok, where you can find versions of Luke past the 4.0.0-alpha available at the site. Luke 4.4 should be able to read the current index format with some caveats.

Fuu
  • 3,424
  • 4
  • 33
  • 49
8

There is person who took his time to fix luke for lucene-4.3.1.

https://github.com/tarzanek/luke

teodimoff
  • 133
  • 5
  • Great going! I tried doing it myself, but I don't know that much Lucene yet, so I'd resorted to rolling back to an earlier version of Lucene which was supported by Luke. – carlspring Jul 19 '13 at 23:19
  • 2
    Just git clone it and then run the jar lukeall file in the dist directory – TheSteve0 Sep 09 '13 at 18:10
3

There is a newer repository on github, where one can download releases:

https://github.com/DmitryKey/luke/releases

Renaud
  • 16,073
  • 6
  • 81
  • 79