Document
In the Elasticsearch world (that is, in Lucene world), a document is the main entity and basic unit of user data.
As mentioned earlier, the document format is JSON. Documents consist of fields (that is, properties) and value pairs. Each field has a name and a type supporting existing data types. A field is stored physically in a type within an index as an element of a document that has a unique ID.
Now, let's send a document to Elasticsearch:
curl -XPOST localhost:9200/premierleague/topscorer -d '{ "fullname": "Robin van Persie", "age": 32, "birthdate": "1983-08-06", "current_club": "Fenerbahce SK" }' {"_index":"premierleague","_type":"topscorer","_id":"AU8I47O90qdql2fUT1Oh","_version":1,"created":true}
As seen, we indexed the document without any preparation. Because Elasticsearch is schema-less, it does not request...