Невозможно установить вложенный тип для отображения поля из python вasticsearch.
Вот мои отображения:
"mappings": {
"properties": {
"contact": {
"name": "nested",
"include_in_parent": True,
"properties": {
"name": {
"type": "text",
"analyzer": "standard",
"index_analyzer": "text_analyzer",
"search_analyzer": "standard",
"index_options": "offsets",
"fields": {
"raw": {
"type": "text",
"analyzer": "raw_sort_analyzer"
}
}
},
"phone_number": {
"type": "text",
"index_analyzer": "phone_analyzer",
"search_analyzer": "digit_analyzer",
"index_options": "offsets"
},
}
}
}
}
и результат, полученный из kibana:
"contact" : {
"properties" : {
"name" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"phone_number" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
},
моя версия ES - 7.1.0, и я использую библиотекуasticsearch на python с версией 7.0.5