Fix creation of ElasticSearch mapping.