Hi,
elastic is great but elastic HttpRestClientApi is very too dependent of Lucene ! why did you include all server in the RestApiClient (lucene include) for request an external elasticsearch node ?
My probleme is that i use hibernatesearch elastic search backend to create index and auto index document. I need to request elasticsearch to extract statistics and for that i user the rest api client.
But that a big deal, hibernatesearch include Lucene 5.5.5, elasticsearch in the last 5.6.8 version include lucene 7 and a big conflicts are unsolved. I exclude with maven all dependencies of Lucene for Elasticsearch server package, i create a fake class of Version.java (package org.apache.lucene.util; ) launch and compile. In this step i thinks that work. But my project use liquibase for track and create database migration. And again a lucene dependancies appear... if i remove all elasticsearch package and comment the code for ElasticSearch : no problem to compile, launch, and goal liquibase.
with elasticsearch and goal liquibase :
Exception in thread "main" java.util.ServiceConfigurationError: An SPI class of type org.apache.lucene.codecs.PostingsFormat with classname org.apache.lucene.search.suggest.document.Completion50Postin
gsFormat does not exist, please fix the file 'META-INF/services/org.apache.lucene.codecs.PostingsFormat' in your classpath.
at org.apache.lucene.util.SPIClassIterator.next(SPIClassIterator.java:160)
at org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:70)
at org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:51)
at org.apache.lucene.util.NamedSPILoader.(NamedSPILoader.java:38)
at org.apache.lucene.codecs.PostingsFormat$Holder.(PostingsFormat.java:49)
at org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:112)
at org.apache.lucene.codecs.lucene54.Lucene54Codec.(Lucene54Codec.java:161)
at org.apache.lucene.codecs.lucene54.Lucene54Codec.(Lucene54Codec.java:81)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
my question and my request is : Why did you include all elasticsearch server in the Rest Api client ? Why did you need to know the lucene version ? by read of codesource, the RestApiClientApi just need elasticsearch package for Serialise / deserialize object send and receive by the server... can you extract this part, package it, reuse it in the server and in the Rest Api Client instead of include all elasticsearch server with lucene inside the RestApiClient ?