Reputation: 319
I have my index mapping with nested:
I want to add new field 'organization' to my nested 'subject'. How should I do it through Kibana?
{
"index_test": {
"mappings": {
"search_type": {
"properties": {
"person": {
"properties": {
"relation": {
"properties": {
"subject": {
"type": "nested",
"properties": {
"firstName": {
"type": "keyword",
"fields": {
"english": {
"type": "text",
"analyzer": "english"
} } },
"lastName": {
"type": "keyword",
"fields": {
"english": {
"type": "text",
"analyzer": "english"
} } } } } } } } } }} } }
Upvotes: 0
Views: 241
Reputation: 217284
Simply add the new sub-field like this:
PUT index_test/_mapping/search_type
{
"properties": {
"person": {
"properties": {
"relation": {
"properties": {
"subject": {
"type": "nested",
"properties": {
"organization": {
"type": "keyword",
"fields": {
"english": {
"type": "text",
"analyzer": "english"
}
}
}
}
}
}
}
}
}
}
}
Upvotes: 1