Validate document before sending to elasticsearch

Hi,
I have a strict mapping in my ES cluster and send documents via Logstash, sometimes the documents get dropped because they don't conform the strict mapping, is there a way to check if the document conforms or not to the mapping before sending to elasticsearch and gets dropped?
Thanks
A

nothing?

You would need to check every field in the document to see if they are in your mapping or not, you could do that writing a ruby script with the ruby filter that will compare the field name with a list of allowed fields.

Not sure how this script would like because I do not know ruby enough, but it probably can be done using the ruby script.

You could also use the prune filter to only allow the mapped fields.

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