# Upgrading ES from 2.3 to 5.6 - Java

**URL:** <https://discuss.elastic.co/t/upgrading-es-from-2-3-to-5-6-java/104109>\
**Category:** Elasticsearch\
**Created:** [October 16, 2017, 3:28pm UTC](https://discuss.elastic.co/t/upgrading-es-from-2-3-to-5-6-java/104109 "2017-10-16T15:28:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgragg](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tgragg](https://discuss.elastic.co/u/tgragg)\
**Post date:** [October 16, 2017, 3:28pm UTC](https://discuss.elastic.co/t/upgrading-es-from-2-3-to-5-6-java/104109/1 "2017-10-16T15:28:02Z")

</div>

I'm trying to update a Java service using the elasticsearch library.  
Upgrading from  
"org.elasticsearch" % "elasticsearch" % "2.3.2",  
to  
"org.elasticsearch" % "elasticsearch" % "5.6.3",

The compiler is complaining about two functions:  
TransportClient.builder() ,  
Client.addFields (stringed together with .setQuery().setSize().addScriptFields().addFields("\_source") ) ,//We had to add \_source back because addScriptFields removed \_source from the result.

I've tried searching through the docs, but have not figured out what I need to do to make things work again.. Any advice is appreciated.

---

<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:** [November 13, 2017, 3:28pm UTC](https://discuss.elastic.co/t/upgrading-es-from-2-3-to-5-6-java/104109/2 "2017-11-13T15:28:11Z")

</div>

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