An inverted index is a data structure that consists of a list of all unique words and list of the documents in which it appears. New documents are analyzed and then stored as inverted indexes, to allow very fast full-text searches.
Analysis is the process of converting the text into tokens and normalizing tockens before adding them into an inverted index. When we do a full text search, we search the inverted index rather than on the actual documents. So both the indexed text and the query string must be analyzed.
Mapping defines the types, formats etc. for different fields in an Elasticsearch document. Mapping also defines various ways in which fields / types behave in different situations (e.g. dynamic mapping allows creation of types dynamically). Mpping may also denote how a document’s metadata associated (e.g. _index, _type, _id, and _source ) is treated.
Mappings are defined for each type and with ES 6.2 there can be only one type per index. Therefore mappings are defined per index.