I an indexing my documents with an explicit mapping that I have specified. These documents:
have a document type (_doc): a metadata label, the type of document being indexed.
have a mapping: Either dynamically established by ES or specified explicitly by me.
used to have a mapping type: used to represent the type of document or entity being indexed.
Each document had a _type meta-field containing the type name, and searches could be limited to one or more types by specifying the type name(s) in the URL:
I don't understand if the _doc field or _type field currently or used to be referred to as a document-type or mapping-type. I would like to understand what a document-type or mapping-type is and how they relate to how the mapping is generated for an index.
I have seen the term document-type used casually and have seen it in a legacy project, but I don't see it defined in the ES docs and so am confused as to what exactly a document-type is and if it is a synonym for the deprecated mapping-type.
In your pasted example, the values of the _type are user and tweet.
But ignore references to anything like _type or document types, they are deprecated and will be removed in 8.0. _doc is a default we use in 7.X to get users used to this being gone, so they're similar to user and tweet as per your example.
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.