Within a search engine, mapping defines how a document is indexed and how its fields are indexed and stored. We can compare mapping to a database schema in how it describes the fields and properties that documents hold, the datatype of each field (e.g., string, integer, or date), and how those fields should be indexed and stored by Lucene. It is very important to define the mapping after we create an index — an inappropriate preliminary definition and mapping may result in the wrong search results.