2016-10-04 38 views
0

我只在elasticsearch中有一个索引,名称为aa-bb-YYYY-MM。 此索引中的文档包含一个我想用作日期字段的字段。 这些文档已从自定义脚本插入(不使用logstash)。Kibana创建索引模式:通配符的奇怪行为

当创建在kibana索引模式:

  1. 如果我进入AA-BB- *,日期字段没有找到。
  2. 如果我输入aa- *,则找不到日期字段。
  3. 如果我输入aa *,则找到日期字段,并且可以创建索引模式。

但我真的需要按前两个“维度”对索引进行分组。我试着用“_”代替“ - ”,结果相同。

有什么想法发生了什么?

回答

0

它为我工作。我正在5.0版本分支上发布最新版本(刚过beta1版本)。我不知道你在用什么版本。

我创建此索引并添加了2个文档;

curl --basic -XPUT 'http://elastic:[email protected]: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:[email protected]:9200/aa-bb-2016-09/test/1' -d '{ 
     "date" : "2015-08-23T00:01:00", 
     "action" : "start", 
     "myid" : 1 
    }' 

curl -XPUT 'http://elastic:[email protected]:9200/aa-bb-2016-09/test/2' -d '{ 
     "date" : "2015-08-23T14:02:30", 
     "action" : "stop", 
     "myid" : 1 
    }' 

,我能够与aa-bb-* enter image description here

创建索引模式