# Lucene dependencies in ElasticSearch High Level Client

**URL:** <https://discuss.elastic.co/t/lucene-dependencies-in-elasticsearch-high-level-client/107606>\
**Category:** Elasticsearch\
**Created:** [November 14, 2017, 7:07pm UTC](https://discuss.elastic.co/t/lucene-dependencies-in-elasticsearch-high-level-client/107606 "2017-11-14T19:07:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor\_Luiz\_Guimarae](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@Victor\_Luiz\_Guimarae](https://discuss.elastic.co/u/Victor_Luiz_Guimarae)\
**Post date:** [November 14, 2017, 7:07pm UTC](https://discuss.elastic.co/t/lucene-dependencies-in-elasticsearch-high-level-client/107606/1 "2017-11-14T19:07:08Z")

</div>

Hello,

We are migrating from Solr to ElasticSearch. I using the ElasticSearch High Level Client and ElasticSearch in the 5.6.2 version.

The High Level Client are using Lucene 6.6.1 and my already exists projects are using the 5.3.2. I got a lot of problems in my projects with the new Lucene version, and when I exclude the Lucene dependencies from ElasticSearch client keeping the Lucene 5.3.2, I get the following error:

```auto
java.lang.NoSuchFieldError: LUCENE_5_4_1
	at org.elasticsearch.Version.<clinit>(Version.java:57)

```

Can I use the High Level Client with 5.3.2 Lucene version? Or can I remove the Lucene for the High Level Client?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [November 15, 2017, 7:15am UTC](https://discuss.elastic.co/t/lucene-dependencies-in-elasticsearch-high-level-client/107606/2 "2017-11-15T07:15:03Z")

</div>

It is not possible to change the version of lucene, or remove it as a dependency. I recommend running your replacement application in a separate jvm if you can.

---

<div class="post-metadata">

**Author:** ![Victor\_Luiz\_Guimarae](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@Victor\_Luiz\_Guimarae](https://discuss.elastic.co/u/Victor_Luiz_Guimarae)\
**Post date:** [November 15, 2017, 11:46am UTC](https://discuss.elastic.co/t/lucene-dependencies-in-elasticsearch-high-level-client/107606/3 "2017-11-15T11:46:37Z")

</div>

Unfortunately, I can not do that. Do you have plans to remove this dependencies for the High Level Rest Client? Otherwise, where can I suggest this improve?

I will change my code to use the Low Level Rest Client. My biggest problem for that will be re-implement the BulkProcessor.

Thank you.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 15, 2017, 12:17pm UTC](https://discuss.elastic.co/t/lucene-dependencies-in-elasticsearch-high-level-client/107606/4 "2017-11-15T12:17:01Z")

</div>

In case it helps, here is what I did with the Low Level client before I switched to the High level client: [https://github.com/dadoonet/fscrawler/tree/3b8f4d79c804dcceda8c36b1d7cce41b676474ed/src/main/java/fr/pilato/elasticsearch/crawler/fs/client](https://github.com/dadoonet/fscrawler/tree/3b8f4d79c804dcceda8c36b1d7cce41b676474ed/src/main/java/fr/pilato/elasticsearch/crawler/fs/client)

HTH

---

<div class="post-metadata">

**Author:** ![Victor\_Luiz\_Guimarae](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@Victor\_Luiz\_Guimarae](https://discuss.elastic.co/u/Victor_Luiz_Guimarae)\
**Post date:** [November 15, 2017, 12:21pm UTC](https://discuss.elastic.co/t/lucene-dependencies-in-elasticsearch-high-level-client/107606/5 "2017-11-15T12:21:12Z")

</div>

Thank you, this will help me a lot.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 13, 2017, 12:21pm UTC](https://discuss.elastic.co/t/lucene-dependencies-in-elasticsearch-high-level-client/107606/6 "2017-12-13T12:21:34Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
