Es can validate data before insert/update?

If i insert a string data to a number field,es will resp [failed to parse [xxx]]; nested: NumberFormatException[For input string: "xxx"].

I can validate data before insert to avoid the exception?

Hi,

Elasticsearch validates the data before insertion but there's no way to avoid the exception. You should validate data before indexing or you can ignore the exception.

Thank you. Elasticsearch has any validate api?