To better explain the various concepts in this chapter, we will use the e-commerce site as an example. We will create an index with a list of products. This will be a very simple index called chapter6 with type called product. The mapping for the product type is shown here:
#Delete existing index if any
DELETE chapter6
#Mapping
PUT chapter6
{
"settings": {},
"mappings": {
"product": {
"properties": {
"product_name": {
"type": "text",
"analyzer": "english"
},
"description" : {
"type": "text",
"analyzer": "english"
}
}
}
}
}
For the product_name and description fields, the English analyzer will be used instead of the default standard...