无法从文档创建最简单的Map
index_name = "index_test"
mapping = {
"mappings": {
"properties": {
"age": { "type": "integer" },
"email": { "type": "keyword" },
"name": { "type": "text" }
}
}
}
resp = es.indices.create(index=index_name, body=mapping)
版本
弹性传输==8.4.0
Elasticsearch==7.17.9
elasticsearch-dsl==7.4.1
出错了
elasticsearch.exceptions.RequestError:RequestError(400,'mapper_parsing_exception','根Map定义具有不支持的参数:[Map:{properties={name={type=text},age={type=integer},email={type=keyword}}}]')
1条答案
按热度按时间72qzrwbm1#
当更新你的Map时,你不需要
mappings
部分,只需要像这样做: