# NodeBuilder replacement

**URL:** <https://discuss.elastic.co/t/nodebuilder-replacement/245993>\
**Category:** Elasticsearch\
**Created:** [August 22, 2020, 5:22pm UTC](https://discuss.elastic.co/t/nodebuilder-replacement/245993 "2020-08-22T17:22:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pete\_Watcharawit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pete_watcharawit/32/74140_2.png) [@Pete\_Watcharawit](https://discuss.elastic.co/u/Pete_Watcharawit)\
**Post date:** [August 22, 2020, 5:22pm UTC](https://discuss.elastic.co/t/nodebuilder-replacement/245993/1 "2020-08-22T17:22:27Z")

</div>

I am new to ES and trying to upgrade ES from 2.3 to 7.8. The following lines of code containing NodeBuilder are deprecated.  
`import org.elasticsearch.common.settings.Settings;`  
`import org.elasticsearch.node.NodeBuilder;`  
`Settings settings = Settings.builder().loadFromPath(Paths.get("config/elasticsearch.yml").toAbsolutePath()).build();`  
`NodeBuilder.nodeBuilder().settings(settings).node();`  
What would be a good way to replace that NodeBuilder?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [August 22, 2020, 5:38pm UTC](https://discuss.elastic.co/t/nodebuilder-replacement/245993/2 "2020-08-22T17:38:42Z")

</div>

That code is running an "embedded" Elasticsearch node, a mode which is [no longer supported](https://www.elastic.co/blog/elasticsearch-the-server) (for ~4 years). The only supported way to run Elasticsearch is as a standalone server process (or a cluster of the same) and to interact with it via its client APIs.

---

<div class="post-metadata">

**Author:** ![Pete\_Watcharawit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pete_watcharawit/32/74140_2.png) [@Pete\_Watcharawit](https://discuss.elastic.co/u/Pete_Watcharawit)\
**Post date:** [August 23, 2020, 9:32am UTC](https://discuss.elastic.co/t/nodebuilder-replacement/245993/3 "2020-08-23T09:32:16Z")

</div>

Any more detailed clues on the simplest code to start a connection with ES 7.8 on the local machine using Java API would be welcome. I am currently reading up the [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.8/index.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.8/index.html)

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [August 23, 2020, 12:37pm UTC](https://discuss.elastic.co/t/nodebuilder-replacement/245993/4 "2020-08-23T12:37:00Z")

</div>

Those are the right docs to look at, yes. The "getting started" section should get you started, particularly [this page](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-getting-started-initialization.html).

---

<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:** [September 20, 2020, 12:37pm UTC](https://discuss.elastic.co/t/nodebuilder-replacement/245993/5 "2020-09-20T12:37:07Z")

</div>

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