Disable mapping for all fields except one index field

I want to index documents where same field can have different date types (current model is disappointingly low level...)

To this end, I want to add an index field to my document, and disable mapping for every other field except this index field.

Is there a way to configure in the mappings to do this? there is a question from earlier that is closed without getting an answer, which is very disappointing.

I think you can define a dynamic template which tells elasticsearch to ignore all fields and within the same mapping define a field which is indexed.

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