Hi,
I've been trying to get Luke to read my Elasticsearch 6.2.0 index without any success. I found
some guidelines which involve repackaging the Luke jar with updated dependencies, but unfortunately the Elasticsearch SPI classes it documents seem to be out of date. I've added elasticsearch 6.2.0 to my pom.xml and added org.elasticsearch.index.codec.PerFieldMappingPostingFormatCodec to the org.apache.lucene.codecs.PostingsFormat before re-packaging but I'm getting a ClassCast exception. Honestly I think that this is only the beginning of my problems, so I'd really appreciate some help from someone more familiar with both Luke and Elasticsearch internal APIs.
Here's the stacktrace from Luke logs:
[2018-08-12 21:03:59,044] ERROR (ExceptionHandler.java:78) -
java.lang.ExceptionInInitializerError
at org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:112)
Caused by: java.lang.ClassCastException: class org.elasticsearch.index.codec.PerFieldMappingPostingFormatCodec
at java.lang.Class.asSubclass(Class.java:3404)
at org.apache.lucene.util.SPIClassIterator.next(SPIClassIterator.java:156)
at org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:70)
at org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:51)
at org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:38)
at org.apache.lucene.codecs.PostingsFormat$Holder.<clinit>(PostingsFormat.java:49)
... 74 more
Luke 7.4.0
Thanks in advance,
Ronan McHugh