NodeBuilder replacement

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?

That code is running an "embedded" Elasticsearch node, a mode which is no longer supported (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.

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

Those are the right docs to look at, yes. The "getting started" section should get you started, particularly this page.

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