Setting document type with dynamic mapping to 'strict'


I'm using a template with strict dynamic mapping turned on (i.e. ES output plugin will reject documents that don't have a defined mapping, or if the fields do not correspond to the mapping definition). I use this in order to validate the documents.

When I use that in logstash, the event "type" field set by the input plugin gets in the way: the final document has both "type" and a "_type" fields with the same value. As a result the document is not indexed because the "type" field is not defined in my mapping.

How can I have the elastic output filter properly define the document type with additionally having this "type" field in the source ?

Thanks for your help


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