我试图将ignore_malformed
放在ElasticSearch Mapping中的字段属性中。
EClient.indices.putMapping(
{
index: 'activities',
type: 'user',
body: {
properties: {
meta: {
type: 'object',
ignore_malformed: true, // meta is dynamic
},
},
},
},
(err, res) => {
console.info('Put Mapping Error:', err);
console.info('Put Mapping Res:', res);
}
);
但我得response: '{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Mapping definition for [meta] has unsupported parameters: [ignore_malformed : true]"}],"type":"mapper_parsing_exception","reason":"Mapping definition for [meta] has unsupported parameters: [ignore_malformed : true]"},"status":400}',
。
根据文档:ignore_malformed它应该有效。 是否有人可以告诉我我的代码有什么问题?