Hello everyone,
I would like to update a document that contains a nested object. I've already seen that sounds possible using script. However, it appears that we can't use params in Logstash ...
My mapping for the concerned Type is :
Array_sensorsMaterialsTable": {
"dynamic": "strict",
"properties": {
"@timestamp": {
"type": "date"
},
"materials_sensorsMaterialsTable_columns": {
"dynamic": "strict",
"type": "nested",
"properties": {
"sensorMaterialsHumidity": {
"type": "integer"
},
"sensorMaterialsTemperature": {
"type": "integer"
},
"sensorMaterialsId": {
"type": "integer"
}
}
},
"host": {
"type": "ip"
},
"array_name": {
"index": "analyzed",
"type": "string"
}
}
}
I want to use Logstash in order to :
- Create the document if not exists
- Update the document if exists by updating nested object
And my logstash configuration is :
elasticsearch {
action => "update"
index => "index"
document_type => "type"
document_id => "id"
doc_as_upsert => true
}
Thank you for your help