在我的系统中,数据的插入总是通过 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
,我不介意它是所有未来数据插入弹性搜索的默认设置