我可以執(zhí)行以下操作來創(chuàng)建新的 ES 索引:>>> es.indices.create(index = 'example_index'){u'index': u'example_index', u'acknowledged': True, u'shards_acknowledged': True}但是,如果我添加任何類型的映射,我會收到一個未知錯誤。例如:request_body = { 'mappings': { '_doc': { 'properties': { 'address': {'index': 'not_analyzed', 'type': 'string'}, 'some_PK': {'index': 'not_analyzed', 'type': 'string'}, }}}}es.indices.create(index = 'example_index', body=request_body)> TransportError: <unprintable TransportError object>我將如何在此處使用預(yù)定義的映射創(chuàng)建適當(dāng)?shù)乃饕??為什么它會給出如此無用的錯誤消息?
使用映射創(chuàng)建新的 ElasticSearch 索引
慕無忌1623718
2021-06-11 21:00:01