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

标签 elasticsearch apache-camel kibana

我正在尝试使用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/

相关文章:

java - 设置属性以在 apache Camel 中编写 groovy 组件脚本

validation - 使用Camel中的Apache Validator组件进行XML验证

java - 使用 camel rest-dsl 相互调用

elasticsearch - 如何在Kibana(ElasticSearch)中编写OR查询?

elasticsearch - 对 Elasticsearch 类型的所有字段使用 Completion Suggester

angular - 将属性从字符串更改为对象后,elasticsearch不再可以为数据对象编制索引

ruby-on-rails - 具有多面GeoPoint搜索的 Elasticsearch

C# Elasticsearch NEST 无法转换 lambda 表达式

java - 如何在 Elasticsearch 中使用术语查询嵌套的json对象/字段?

使用 NOT 进行 Kibana 搜索