and then send data to it with fields that aren't included in the mapping, they are still created dynamically. If I set dynaminc to "strict" then the data sent is dropped. Having dynamic as false seems to give identical behaviour to having it as true, or undefined.
Turned out this was me misunderstanding that elasticsearch stores the entire object given to it as the _source property of the document. I was mistaken about the mapping changing, with dynamic: false the mapping remains unaltered, elasticsearch only indexes the properties you told it to in the mapping.
So the confusion was that elasticsearch still stores the entire document that you post in to it, not just the data that you defined as indexes in the mapping. Which on reflection some might say is pretty obvious if you understand the basic principles of how elasticsearch works, which I obviously did not.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.