elasticsearch Kibana空表问题
我是elasticsearch的新手,我尝试着在官方网页上学习一些基本的例子。我使用以下映射创建了一个简单索引:
elasticsearch Kibana空表问题,
elasticsearch,panel,kibana,
elasticsearch,Panel,Kibana,我是elasticsearch的新手,我尝试着在官方网页上学习一些基本的例子。我使用以下映射创建了一个简单索引: curl -XPUT 'http://localhost:9200/twitter/tweet/_mapping' -d ' { "tweet" : { "properties" : { "message" : {"type" : "string", "index": "not_analyzed" }, "use
curl -XPUT 'http://localhost:9200/twitter/tweet/_mapping' -d '
{
"tweet" : {
"properties" : {
"message" : {"type" : "string", "index": "not_analyzed" },
"user" : {"type" : "string", "index": "not_analyzed" }
}
}
}'
然后我把一些数据放在下面:
curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{
user: "avoidness",
message : "hey elasticsearch!"
}'
在Kibana,当我搜索我放入索引的数据时,似乎所有的事情都很好——除了表面板。即使所有其他面板都正确显示搜索结果,它也始终显示一个空表,其中“0到0(共0个)可用于分页”。我正在使用ESV1.0.0和KibanaV3.0.0里程碑5
在带有curl查询的表面板上还有一个inspect框架,所以我尝试从终端运行它,它似乎工作正常,这是它返回的结果:
{
"took" : 4,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 2,
"max_score" : null,
"hits" : [ {
"_index" : "twitter",
"_type" : "tweet",
"_id" : "2",
"_score" : null, "_source" : {
user: "avoidness",
message : "hey hou"
},
"sort" : [ "2" ]
}, {
"_index" : "twitter",
"_type" : "tweet",
"_id" : "1",
"_score" : null, "_source" : {
user: "avoidness",
message : "hey elasticsearch!"
},
"sort" : [ "1" ]
} ]
}
}
你知道我为什么还有空桌子吗;DR:您的输入文档不是有效的JSON:它缺少键名周围的双引号。修好它,它就会工作 elasticsearch JSON解析器非常灵活,可以解析无效的JSON,从而生成有效的索引。大多数kibana组件只使用索引中的数据,并且工作正常。然而,表组件请求文档源:因为它是逐字存储的,所以表查询返回的数据被它污染了,浏览器拒绝解析产生的无效JSON 本节也讨论了这一问题