Elasticsearch 5.x has no mechanism to silently drop fields that don't conform to particular type based (given mapping)? Elasticsearch 5.x has no mechanism to silently drop fields that don't conform to particular type based (given mapping)? elasticsearch elasticsearch

Elasticsearch 5.x has no mechanism to silently drop fields that don't conform to particular type based (given mapping)?


I'm pretty new to ElasticSearch and doubly so for the +5.x branch, but I just stumbled on the ignore_malformed mapping parameter after reading your question.

Sometimes you don’t have much control over the data that you receive. One user may send a login field that is a date, and another sends a login field that is an email address.

Trying to index the wrong datatype into a field throws an exception by default, and rejects the whole document. The ignore_malformed parameter, if set to true, allows the exception to be ignored. The malformed field is not indexed, but other fields in the document are processed normally.

This last detail seems to describe your use case, not sure, been huffing too much solder fumes this week. :)

Here's the docs:https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-malformed.html