Understanding the schema-less
Certainly one of the most important features of Elasticsearch is its ability to be schema-less but it must be digested with no doubt.
Yes, as stated previously, Elasticsearch does not require some definitions such as index, type, and field type before the indexing process, and when an object is indexed later with a new property, it will automatically be added to the mapping definitions.
So, is the claim about "Elasticsearch stands for the schema-free model" always true?
Recall that types are being created according to the mapping information and mapping is actually a schema definition. Therefore, Elasticsearch expects that mapping and the documents being indexed are compatible.
Now let's examine the following example:
curl -XPUT localhost:9200/my_index/document/1 -d '{"value": "a"}' {"_index":"my_index","_type":"document","_id":"1","_version":1,"...