I have a few elasticsearch fields that I don\'t want to analyze before indexing. I have read that the right way to do this is by altering the index mapping. Right now my map
Just read the Definitive Guide carefully:
Although you can add to an existing mapping, you can’t change existing field mappings. If a mapping already exists for a field, data from that field has probably been indexed. If you were to change the field mapping, the indexed data would be wrong and would not be properly searchable.
Source: https://www.elastic.co/guide/en/elasticsearch/guide/current/mapping-intro.html#updating-a-mapping
So you just have to do it when you create the field. Thats why the code from this answer works without problems.