gpt4 book ai didi

elasticsearch - 数据已使用 Camel 索引到 Elasticsearch 中,但无法在Kibana或localhost:9200中看到

转载 作者:行者123 更新时间:2023-12-02 23:16:01 25 4
gpt4 key购买 nike

我正在尝试使用Apache Camel 在 flex 搜索中插入一些针对某些ID的数据。我已经插入了依赖项:

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-elasticsearch</artifactId>
</dependency>

我正在使用JSONObject,如下所示:
{
"indexId" : "someId",
"messages" : {"message1" : "data1", "message2":"data2"}

}

并使用插入数据:
<to id="elastic_search_camel"
uri="elasticsearch://local?operation=INDEX&amp;indexName=messages&amp;indexType=message" />

我还可以通过使用operation = GET_BY_ID将数据打印回控制台。但是我看不到Kibana或localhost:9200中的索引/数据。

有人可以帮我吗?
提前致谢。

最佳答案

您需要检查索引是否存在-您可以运行

GET es-url:9200/_cat/indices/messages*



并确保索引存在。如果索引不存在,则索引存在问题-您需要预先创建索引,或者在 flex 搜索和 Camel 生产者中查找失败原因的异常(exception)。

确定数据已按预期在ES中建立索引后,可以进入kibana->设置->索引模式,并为这些新的索引模式添加索引模式。之后,您将能够看到kibana中的数据

关于elasticsearch - 数据已使用 Camel 索引到 Elasticsearch 中,但无法在Kibana或localhost:9200中看到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54881561/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com