I'm trying to inspect some ES indices with an updated Luke repo
I can compile and start Luke, with
java -jar lukeall-4.5.1.jar
but when I try to open an index I get the following error message:
A SPI class of type org.apache.lucene.codecs.PostingsFormat with name
'es090' 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, Lucene41]
Does anyone know what might be causes the error? I tried to add the
lucene-codecs-4.4.0.jar and the elasticsearch-0.90.5.jar to the classpath
and also compile them in the lukeall-jar, but the exception is still the
same.
Skywalker certainly looks interesting, but I need to inspect an index that
I have on the file system, that is not in a running ES cluster. I can try
to start a node and somehow make it use the index in question, but I guess
it will not work. Do you have some experience with indices that are copied
over to a different cluster?
On Thursday, November 14, 2013 7:37:32 PM UTC+1, Jörg Prante wrote:
ES uses a posting format "es090" which has to be declared in the
properties, you have to modify the Luke jar and provide an SPI class.
With the skywalker project, I also try to inspect ES Lucene indices, you
can try it if you want. I do not inspect postings format yet...
OK, I see. Maybe I should prepare a standalone skywalker jar for that
purpose.
Yes, you should be able to move a shard over the file system, it should be
picked up as a shard by the target cluster. Better is to move all the
shards of an index to the target to keep the index structure intact
(shards, replica).
The file system copy of a part of the cluster is not guaranteed to work for
different cluster versions though, it may work or not. I suggest moving the
whole "data" folder is a safer way, also to copy the cluster state.
For those who are interested, I managed to open an ES index with the luke
version from the repo I mentioned in the opening post. I did the following:
-included the ES jar in the lib folder of luke
-added an entry for it to be compiled in the jar (under target compile in
the ant script I added:
-ran ant dist
-uncompressed lukeall-4.5.1.jar
-added the following entry to the file
META-INF/services/org.apache.lucene.codecs.RostingsFormat:
org.elasticsearch.index.codec.postingsformat.Elasticsearch090PostingsFormat
-compressed the folder again to lukeall-ES_PATCHED-4.5.1.jar
-ran java -jar lukeall-ES_PATCHED-4.5.1.jar
-profit!
On Friday, November 15, 2013 9:05:15 AM UTC+1, Jörg Prante wrote:
OK, I see. Maybe I should prepare a standalone skywalker jar for that
purpose.
Yes, you should be able to move a shard over the file system, it should be
picked up as a shard by the target cluster. Better is to move all the
shards of an index to the target to keep the index structure intact
(shards, replica).
The file system copy of a part of the cluster is not guaranteed to work
for different cluster versions though, it may work or not. I suggest moving
the whole "data" folder is a safer way, also to copy the cluster state.
Get lucene 4.7.0 tgz archive and extract lucene-suggest-4.7.0.jar to the
luke lib directory
Copy the elasticsearch-1.0.1.jar to the luke lib directory
Build with ant dist
Edit dist/lukeall-4.7.0.jar with vi and then edit the following file
META-INF/services/org.apache.lucene.codecs.PostingsFormat
Then add the following lines and save :
org.elasticsearch.index.codec.postingsformat.BloomFilterPostingsFormat
org.elasticsearch.index.codec.postingsformat.Elasticsearch090PostingsFormat
org.elasticsearch.search.suggest.completion.Completion090PostingsFormat
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.