Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Indexing 无法为弹性搜索索引中的字段指定类型_Indexing - Fatal编程技术网

Indexing 无法为弹性搜索索引中的字段指定类型

Indexing 无法为弹性搜索索引中的字段指定类型,indexing,Indexing,我正在使用logstash、elastic search和Kibana。 输入文件为.csv格式 我首先通过Kibana中的开发工具>控制台创建了以下映射: PUT /defects { "mappings": { "type_name":{ "properties" : { "Detected on Date" :{ "type": "date" }, "D

我正在使用logstash、elastic search和Kibana。 输入文件为.csv格式

我首先通过Kibana中的开发工具>控制台创建了以下映射:

PUT /defects
{
   "mappings": {
      "type_name":{ 
        "properties" : {
            "Detected on Date" :{
                "type": "date"
            },
           "DEFECTID": {
                "type": "integer"
            }
      }
    } 
  }
 }
这是成功的。然后创建一个logstash conf文件并运行它

这是我的logstash.conf文件:

input {
    file {
        path => ["E:/d drive/ELK/data/sample.csv"]
        start_position => "beginning"
        sincedb_path => "/dev/nul"
    }
} 
filter {
  csv {
    columns => ["DEFECTID","Detected on Date","SEVERITY","STATUS"]
separator => ","
}
} 
output {
    elasticsearch {
     action => "index"
    hosts => "localhost:9200"
    manage_template => false
    template_overwrite => true
    index => "defects"
   }
 }

我在Kibana中创建了索引模式缺陷*。当我查看字段的类型时,所有字段都显示为字符串。请让我知道我缺少的位置

因为此字段带有空格(即使映射成功),所以定义Detected on Date可能有问题。尝试删除索引并在没有空格的情况下再次映射它。由于此字段带有空格(即使映射成功),因此定义“在日期检测到”可能会有问题。请尝试删除索引,并在没有空格的情况下再次映射它