mapping = {
"mappings": {
"properties": {
"Id_centro":{ "type": "keyword" },
"RFC":{ "type": "text" },
"Razon_Social":{ "type": "text" },
"Entidad_Federativa":{ "type": "text" },
"Tipo_De_Centro":{ "type": "text" },
"Nivel_Centro":{ "type": "text" }
}
}
}
Este es el mapeo del indice creado, para agregar el mapeo se utiliza la siguiente linea
es.index(index="centro", id=1, body=mapping)
El mensaje de error es:
TypeError: index() missing 1 required positional argument: 'doc_type'
Elasticsearch version 8.5.0