I have an index with following mapping
{
"testmap": {
"mappings": {
"user": {
"properties": {
"plans": {
"type": "nested",
"properties": {
"user": {
"type": "long"
}
}
},
"status": {
"type": "integer"
}
}
}
}
}
}
I want to delete status field mapping. I don't mind to loose data on that field. Is there any option to delete status field. Tried
curl -XDELETE http://192.168.2.2:9200/testmap/user/status
{"found":false,"_index":"testmap","_type":"user","_id":"status","_version":1
Your help is much appreciated. Thank you.
You use DELETE to remove a document from an index. You must specify the index name and document ID. You cannot send deletion requests directly to a data stream. To delete a document in a data stream, you must target the backing index containing the document.
It is not possible to update the mapping of an existing field. If the mapping is set to the wrong type, re-creating the index with updated mapping and re-indexing is the only option available. In version 7.0, Elasticsearch has deprecated the document type and the default document type is set to _doc.
You can disable dynamic mapping, both at the document and at the object level. Setting the dynamic parameter to false ignores new fields, and strict rejects the document if Elasticsearch encounters an unknown field. Use the update mapping API to update the dynamic setting on existing fields.
To delete the index, you must roll over the data stream so a new write index is created. You can then use the delete index API to delete the previous write index.
You cannot delete the status
field from this mapping. If you really need to get rid of this field, you'll have to create another mapping without status
field and reindex your data. Look at this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With