Kibana创建索引模式:通配符的奇怪行为 [英] Kibana Create Index Pattern : strange behaviour of wildcard
问题描述
我在elasticsearch中只有一个索引,名称为aa-bb-YYYY-MM。
此索引中的文档包含我想用作日期字段的字段。
这些文档已从自定义脚本插入(不使用logstash)。
I have just one index in elasticsearch, with name aa-bb-YYYY-MM. Documents in this index contain a field i want to use as date field. Those documents have been inserted from a custom script (not using logstash).
在kibana中创建索引模式时:
When creating the index pattern in kibana:
- 如果我输入aa-bb- *,则找不到日期字段。
- 如果我输入aa- *,则为日期找不到字段。
- 如果我输入aa *,找到日期字段,我就可以创建索引模式。
但我真的需要按前两个维度对索引进行分组。我尝试使用_代替 - ,结果相同。
But i really need to group indexes by the first two "dimensions".I tried using "_" instead "-", with the same result.
知道发生了什么事吗?
推荐答案
它为我工作。我正在使用5.0版本分支的最新版本(刚刚发布beta1版本)。我不知道你的版本是什么。
Its working for me. I'm on the latest build on the 5.0 release branch (just past the beta1 release). I don't know what version you're on.
我创建了这个索引并添加了2个文档;
I created this index and added 2 docs;
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 - *
and I was able to create the index pattern with aa-bb-*
这篇关于Kibana创建索引模式:通配符的奇怪行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!