Any way to add custom constraints on mapping dynamically generated?

Our Elasticsearch cluster by default enables the dynamic mapping, which
allows to dynamically generate the mappings for the incoming documents.
However, we found that sometimes the not-well defined incoming documents
could pollute the mappings. For example, some mappings could contain
thousands of properties. As we don't want to lose the flexibility of
dynamic mapping, and also like to prevent the mappings from being polluted
by not-well defined documents. So we'd like to know if it's possible to add
some mappings constraints, such as maximum number of properties allowed
under a type, via existing Elasticsearch configuration settings or customer


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit