1
午後。私は最近、ELKスタックのアップデートに取り組んでおり、ES 2.3.1にアップグレードするとダイナミックテンプレートに関する問題が発生しています。私はDebianのUbuntuシステムで作業しています。テンプレートは/ etc/elasticsearch/templatesにあるファイルに定義されています。ファイルからロードする動的テンプレートを取得する方法2.3.1
{
"template_1" : {
"template" : "*",
"mappings" : {
"_default_" : {
"dynamic_templates" : [
{
"geoip-location" : {
"path_match" : "geoip.location",
"mapping" : {
"type" : "geo_point"
}
}
},
{
"geoip-ip" : {
"path_match" : "geoip.ip",
"mapping" : {
"type" : "string",
"norms" : { "enabled" : false }
}
}
},
{
"level-string" : {
"match" : "level",
"mapping" : {
"type" : "string",
"norms" : { "enabled" : false }
}
}
},
{
"line-string" : {
"match" : "line",
"mapping" : {
"type" : "string",
"norms" : { "enabled" : false }
}
}
},
{
"validanswers" : {
"match" : "validanswers",
"mapping" : {
"enabled" : false
}
}
},
{
"jobid" : {
"match" : "context.jobid",
"mapping" : {
"type" : "string",
"norms" : {"enabled" : false }
}
}
}
]
}
}
}
}
私の以前のバージョンでは、これはうまくいきました。私はそれを使用して、古いインデックスをすべて再インデックスすることさえできました。可能であれば、これを外部ファイルとして保持したいと思います。
は2.0.0以降、もはや不可能です マイク
ありがとうございます@AndreiStefan!私はウェブサイトでそれを見つけられなかったとは信じられません。私は何時間もウェブを洗った。後続の質問として、_template APIを使用してファイルをインポートする方法はありますか?これは、CURLステートメントを使用している私の部分の理解の欠如かもしれません。再びありがとう! –
実際に私はCURLステートメントを出しました。もう一度@AndreiStefanに感謝します –