根据docs,这应该足够了:
"settings": {
"index.mapping.ignore_malformed": true
}
但是我怎样才能在 python 包装器上实现这一点呢?我当前的代码如下所示:
from elasticsearch_dsl import Index
index = Index('my_index', my_conn)
index.settings(
number_of_shards=ES_NUMBER_OF_SHARDS,
number_of_replicas=ES_NUMBER_OF_REPLICAS
)
index.create()