【发布时间】:2016-11-01 18:54:02
【问题描述】:
在我的系统中,数据的插入总是通过 csv 文件通过 logstash 完成。我从不预先定义映射。但是每当我输入一个字符串时,它总是被认为是analyzed,因此像hello I am Sinha这样的条目被拆分为hello、I、am、Sinha。无论如何我可以更改弹性搜索的默认/动态映射,以便所有字符串,无论索引,无论类型如何都被视为not analyzed?或者有没有办法在.conf 文件中设置它?说我的conf 文件看起来像
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 {
csv {
columns => ["Comm_Plan","Queue_Booking","Order_Reference","Multi_Ordertype"]
separator => ","
}
ruby {
code => "event['Generation_Date'] = Date.parse(event['Generation_Date']);"
}
}
output {
elasticsearch {
action => "index"
host => "localhost"
index => "promosms-%{+dd.MM.YYYY}"
workers => 1
}
}
我希望所有字符串都是not analyzed,而且我也不介意它是所有未来数据插入到 elasticsearch 中的默认设置
【问题讨论】:
标签: elasticsearch logstash logstash-grok elasticsearch-mapping