My indices are using the parent-child relationship, therefore my sql query returns parent ID that I use in the logstash configuration to use as the parent ID. Here is my logstash configuration,
output {
elasticsearch {
hosts => "https://xxx.us-east-1.es.amazonaws.com"
document_type => "segment"
document_id => "%{id}"
index => "${LANG_INDEX:en-us_th-th}"
parent => "%{upload_id}"
ssl => "true"
manage_template => false
}
}
The issue I have is that currently the parent ID is getting indexed in the child document, which I don't need. If I remove the field in logstash [mutate] then the parent field is not able to get the parent ID field.
How do I avoid elasticsearch from indexing this field?