Insert new field in a existing index

Hi,

I want insert a new field in a existing index, this index have a lot of logs and I don't delete it.

I try with this:

PUT myIndex/_mapping
{
"properties" : {
"newField" : {
"type" : "string"
}
}
}

But the response is the following:

{
"error": {
"root_cause": [
{
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: mapping type is missing;"
}
],
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: mapping type is missing;"
},
"status": 400
}

How could I do it without deleting the index?

Thank you!

I suspect you are using a version prior to 7.x, right?
Which one is that?

What is the output of:

GET /

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.