In addition to the mapped types we learned in the previous mapping rules sections, there are still many other datatypes to map for the fields in the document. Field datatypes are defined in the static mapping. In the Dynamic mapping section, we have shown the data structure from the response of the GET mapping request of default_mappings_index.
The syntax to set the datatype of a field in static mapping is as follows:
"properties": { "field_1": {"type": "field_type_1"}, "field_2": {"type": "field_type_2", "mapping_parameter2a":"parameter2a_value",..}}
Let us examine the description and the example usage for each mapping datatype in the following table:
Mapping datatype |
Description ... |