Disable indexing for all fields by default

I have a mapping for the index I want to create in ElasticSearch. I want to disable indexing for all the fields in the mapping and enable only for a few fields which I can specify. Any suggestions for which mapping parameters or settings would suffice for this?

See https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic.html. You can set either dynamic: strict in the mappings if you want to reject all documents that have unmapped fields, or dynamic: false to keep accepting any document, but only index the subset of their fields that have a mapping.

Actually using dynamic:false would only ensure that no extra field gets indexed. But I want to disable indexing for all the fields in my mapping and just define their datatypes manually.

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