I try to use the new Java elasticsearch-rest-high-level-client. For that I added the maven depenencies shown below:
org.elasticsearch
elasticsearch
${version.es}
compile
org.elasticsearch.client
elasticsearch-rest-client
${version.es}
test
org.elasticsearch.client
elasticsearch-rest-high-level-client
${version.es}
test
The initilasation of the Restclient says:
java.lang.NoSuchFieldError: LUCENE_6_0_0
The analyse of the maven dependencies:
F:\IDE\Projects_Git\reporting-logmodel>mvn dependency:tree -Dverbose -Dincludes=org.apache.lucene | grep 5.3.1
[INFO] +- org.apache.lucene:lucene-core:jar:5.3.1:compile (version managed from 7.2.1)
[INFO] +- org.apache.lucene:lucene-analyzers-common:jar:5.3.1:compile (version managed from 7.2.1)
[INFO] +- org.apache.lucene:lucene-backward-codecs:jar:5.3.1:compile (version managed from 7.2.1)
[INFO] +- org.apache.lucene:lucene-misc:jar:5.3.1:compile (version managed from 7.2.1)
[INFO] +- org.apache.lucene:lucene-queries:jar:5.3.1:compile (version managed from 7.2.1)
[INFO] +- org.apache.lucene:lucene-queryparser:jar:5.3.1:compile (version managed from 7.2.1)
And that resolves my Problem:
org.elasticsearch
elasticsearch
${version.es}
test
org.apache.lucene
lucene-core
org.apache.lucene
lucene-core
7.2.1
test