Sample document in elasticsearch:
{
"name": "Tom",
"hobbies": [
{
"hobby": "go for a walk"
},
{
"hobby": "board games"
}
]
}
Here is mapping added for "name":
{
"person": {
"_all": {
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word",
"term_vector": "no",
"store": "false"
},
"properties": {
"name": {
"type": "string",
"store": "no",
"term_vector": "with_positions_offsets",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word",
"include_in_all": "true",
"boost": 8
}
}
}
}
Problem: How do I add mapping for hobbies.hobby? I want to specify this field for analyzer -> ik_max_word