使用python update API我将一个字符串字段添加到我的ES索引文档中。 甚至我的映射都有:
"mappings" : {
"_default_": {
"dynamic_templates": [
{ "notanalyzed": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type": "string",
"index": "not_analyzed"
}
}
}
]
},
仍在分析新添加的字段。有人注意到同样的问题吗?
这是一段添加新列的python代码:
res = es.search(index=ind, body=st, size=2000)
for rec in res['hits']['hits']:
es.update(index=rec['_index'],doc_type=rec['_type'],id=rec['_id'], body={"doc": {"srcSite": sS}})
所以新添加的" srcSite"仍然以某种方式"分析"。我试图将新字段明确地添加到模板中,但这也无济于事。
答案 0 :(得分:0)