I have one mapping which details are given below:
PUT my_index
{
"mappings": {
"product": {
"properties": {
"search_data": {
"type": "nested",
"properties":{
"string_facet":{
"type":"nested",
"properties":{
"facet_name":{
"type":"text"
},
"facet_value":{
"type":"text"
}
}
}
}
}
}
}
}
}
And I want to put my this below json array data to above mapping so that...it will comes under the search_data array...
PUT my_index/product/1
{
"string_facet": [
{
"facet-name": "manufacturer",
"facet-value": "Fortis"
},
{
"facet-name": "hammer_weight",
"facet-value": "1000"
}
]
}
But after index...i got result like this...my json document is not going inside of the search_data...can anyone tell me where my mapping is wrong.
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": "my_index",
"_type": "product",
"_id": "1",
"_score": 1,
"_source": {
"string_facet": [
{
"facet-name": "manufacturer",
"facet-value": "Fortis"
},
{
"facet-name": "hammer_weight",
"facet-value": "1000"
}
]
}
}
]
}
}
Thank you.