Elasticsearch and luke

How can I open elasticsearch index with luke?

I tried luke from 3.5 to 4.8, from elasticsearch 1.1 to 1.2, and nothing works.

The only resource that seemed to be used was http://rosssimpson.com/blog/2014/05/06/using-luke-with-elasticsearch/ , which, unfortunately, did not work.

+6
source share
3 answers
+1
source

I have not tried it with any other versions, but it seems to work with luke 4.9 and elasticsearch version 1.3.1 (ElasticSearch 1.3.x uses Lucene 4.9 below)

At the command prompt, do:

git clone https://github.com/DmitryKey/luke.git 

or just download the source code for the luke-4.9.0 release. Then edit the pom.xml file and add the following dependency:

 <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>1.3.1</version> </dependency> 

At the command prompt, run again:

 cd luke mvn install 

This should create the target directory with the luke-with-deps.jar file . Open this file in any archive manager and edit the META-INF / services / org.apache.lucene.codecs.PostingsFormat file as described in http://rosssimpson.com/blog/2014/05/06/using-luke-with -elasticsearch / and add the following lines

 org.elasticsearch.index.codec.postingsformat.BloomFilterPostingsFormat org.elasticsearch.index.codec.postingsformat.Elasticsearch090PostingsFormat org.elasticsearch.search.suggest.completion.Completion090PostingsFormat 

Save this and you can start luke with luke.bat or luke.sh. Now you can open the index in / indexname / 0 / index / for example. If you have several clusters in an elasticsearch cluster (default is 5), you may not see all the documents in this cluster, but only part of it. Only if index.number_of_shards is set to 1, should you be able to see all documents.

+1
source

I managed to open the ElasticSearch 1.3.4 index (which uses Lucene 4.9.1 under the hood). I also followed the instructions on the Ross Simpson blog , but that didn't work. According to him, I added an ElasticSearch dependency (in my case version 1.3.4) in pom.xml :

 <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>1.3.4</version> </dependency> 

And also install the Lucene version (in my case 4.9.1) in pom.xml :

 <lucene.version>4.9.1</lucene.version> 

I updated META-INF/services/org.apache.lucene.codecs.PostingsFormat in the bank as shown below:

 org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat org.elasticsearch.index.codec.postingsformat.BloomFilterPostingsFormat org.elasticsearch.index.codec.postingsformat.Elasticsearch090PostingsFormat org.elasticsearch.search.suggest.completion.Completion090PostingsFormat 

So far, the instructions are the same as on the blog. An additional step I took is updating META-INF/services/org.apache.lucene.codecs.Codec add the last line (I received an exception when opening the index that the codec named Lucene49 was not found):

 org.apache.lucene.codecs.simpletext.SimpleTextCodec org.apache.lucene.codecs.appending.AppendingCodec org.apache.lucene.codecs.lucene49.Lucene49Codec 
+1
source

Source: https://habr.com/ru/post/970875/


All Articles