【问题标题】:elastic search high level rest client v.7.5 java how to initializeelastic search high level rest client v.7.5 java如何初始化
【发布时间】:2020-12-29 15:05:50
【问题描述】:

从 7.5 版开始(截至目前最新) https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.5/java-rest-high-getting-started-initialization.html

谁能告诉我sn-p的9201是什么?还没有找到任何关于那是什么的文档。 谢谢!

client = new RestHighLevelClient(
    RestClient.builder(
            new HttpHost("localhost", 9200, "http"),
            new HttpHost("localhost", 9201, "http")));

【问题讨论】:

    标签: elasticsearch


    【解决方案1】:

    这只是显示连接到多个不同端口的示例。如果您在本地机器上运行 2 个 elasticsearch 节点,其中一个将在 9200 上侦听,另一个将在 9201 上侦听。

    您找到了有关此here 的更多详细信息。

    【讨论】:

      猜你喜欢
      • 2020-10-04
      • 2023-04-04
      • 2020-08-22
      • 1970-01-01
      • 2021-11-05
      • 1970-01-01
      • 2019-07-12
      • 2019-12-24
      • 2022-07-08
      相关资源
      最近更新 更多