使用es5.4.3版本,通过API配置"禁用自动类型创建" { "index.mapper.dynamic":false } ,API已经返回OK,查询配置状态已经是false。
也已经重启es,但实际没有效果,通过API录入数据,对于索引默认_default_不存在的字段(aaaaa这个字段),在录入数据的时候记录还是可以正常录入,新的type也添加,请问还需要有其他配置项?
{
audio: {
settings: {
index: {
number_of_shards: "5",
provided_name: "audio",
mapper: {
dynamic: "false"
},
creation_date: "1518175416996",
number_of_replicas: "1",
uuid: "AOKahvIKSc-tbRf81-JQMw",
version: {
created: "5040399"
}
}
}
}
}
也已经重启es,但实际没有效果,通过API录入数据,对于索引默认_default_不存在的字段(aaaaa这个字段),在录入数据的时候记录还是可以正常录入,新的type也添加,请问还需要有其他配置项?
{
audio: {
mappings: {
1: {
properties: {
aaaaa: {
type: "long"
},
filename: {
type: "text",
analyzer: "ik_smart"
},
filename_keyword: {
type: "keyword"
},
fs_id: {
type: "text"
},
meta_album: {
type: "text",
analyzer: "ik_smart"
},
meta_artist: {
type: "text",
analyzer: "ik_smart"
},
meta_artist_keyword: {
type: "keyword"
},
meta_genre: {
type: "text",
analyzer: "ik_smart"
},
meta_title: {
type: "text",
analyzer: "ik_smart"
},
meta_title_keyword: {
type: "keyword"
},
meta_year: {
type: "date",
format: "yyyy"
}
}
},
_default_: {
properties: {
filename: {
type: "text",
analyzer: "ik_smart"
},
filename_keyword: {
type: "keyword"
},
fs_id: {
type: "text"
},
meta_album: {
type: "text",
analyzer: "ik_smart"
},
meta_artist: {
type: "text",
analyzer: "ik_smart"
},
meta_artist_keyword: {
type: "keyword"
},
meta_genre: {
type: "text",
analyzer: "ik_smart"
},
meta_title: {
type: "text",
analyzer: "ik_smart"
},
meta_title_keyword: {
type: "keyword"
},
meta_year: {
type: "date",
format: "yyyy"
}
}
}
}
}
}
1 个回复
Jea - 一只猿
赞同来自: