How to set include_type_name to be true or false by Java rest High client APM in order to solve follwing issue :
Elasticsearch error: Types cannot be provided in get mapping requests, unless include_type_name is set to true.
Thanks a lot !
How to set include_type_name to be true or false by Java rest High client APM in order to solve follwing issue :
Elasticsearch error: Types cannot be provided in get mapping requests, unless include_type_name is set to true.
Thanks a lot !
You can't. If you want to do that, you can only use the low level client.
I found Restful API and python API to set "include_type_name".
Restful API:
PUT /send-mje-version-size-test4?include_type_name=true
{
"mappings": {
"_doc": {
"properties": {
"lastModified": {
"type": "text"
},
"mjeVersion": {
"type": "text"
},
"sizeOnDisk": {
"type": "long"
}
}
}
}
}
Python API:
es.indices.create(index=indexName, include_type_name=True)
or
es.indices.put_mapping(index=indexName, body=mappings, include_type_name=True)
BRs//Hengtai
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.