Basic
是一个浮点字段。提到的索引在弹性搜索中不存在。使用 运行配置文件时logstash -f
,我也不例外。然而,在 elasticsearch 中反映和输入的数据显示为Basic
as的映射string
。我该如何纠正这个问题?以及如何为多个字段执行此操作?
input {
file {
path => "/home/sagnik/work/logstash-1.4.2/bin/promosms_dec15.csv"
type => "promosms_dec15"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
grok{
match => [
"Basic", " %{NUMBER:Basic:float}"
]
}
csv {
columns => ["Generation_Date","Basic"]
separator => ","
}
ruby {
code => "event['Generation_Date'] = Date.parse(event['Generation_Date']);"
}
}
output {
elasticsearch {
action => "index"
host => "localhost"
index => "promosms-%{+dd.MM.YYYY}"
workers => 1
}
}