【问题标题】:Kibana Create Index Pattern : strange behaviour of wildcardKibana 创建索引模式:通配符的奇怪行为
【发布时间】:2017-02-12 13:35:22
【问题描述】:
我在 elasticsearch 中只有一个索引,名称为 aa-bb-YYYY-MM。
此索引中的文档包含我想用作日期字段的字段。
这些文档是从自定义脚本中插入的(不使用 logstash)。
在kibana中创建索引模式时:
- 如果我输入 aa-bb-*,则找不到日期字段。
- 如果我输入 aa-*,则找不到日期字段。
- 如果我输入 aa*,则会找到日期字段,我可以创建索引模式。
但我确实需要按前两个“维度”对索引进行分组。我尝试使用“_”而不是“-”,结果相同。
知道发生了什么吗?
【问题讨论】:
标签:
elasticsearch
indexing
kibana
【解决方案1】:
它对我有用。我在 5.0 版本分支上的最新版本(刚刚超过 beta1 版本)。不知道你用的是什么版本。
我创建了这个索引并添加了 2 个文档;
curl --basic -XPUT 'http://elastic:changeme@localhost:9200/aa-bb-2016-09' -d '{
"settings" : {
"number_of_shards" : 1
},
"mappings" : {
"test" : {
"properties" : {
"date" : { "type" : "date"},
"action" : {
"type" : "text",
"analyzer" : "standard",
"fields": {
"raw" : { "type" : "text", "index" : "not_analyzed" }
}
},
"myid" : { "type" : "integer"}
}
}
}
}'
curl -XPUT 'http://elastic:changeme@localhost:9200/aa-bb-2016-09/test/1' -d '{
"date" : "2015-08-23T00:01:00",
"action" : "start",
"myid" : 1
}'
curl -XPUT 'http://elastic:changeme@localhost:9200/aa-bb-2016-09/test/2' -d '{
"date" : "2015-08-23T14:02:30",
"action" : "stop",
"myid" : 1
}'
我能够使用aa-bb-* 创建索引模式