Need to get result from outer object from inner properties

i have mapping like below,

"name": {
"properties": {
"en": {
"type": "text",
"fields": {
"custom": {
"type": "text",
"analyzer": "custom_english"
},
"raw": {
"type": "keyword",
"index": true
}
}
},
"hn": {
"type": "text",
"fields": {
"custom": {
"type": "text",
"analyzer": "custom_hindi"
},
"raw": {
"type": "keyword",
"index": true
}
}
}
}
}

i have a data in properties "en" and "hn" respectively,

name:{
en:"Kodomo Soft & Slim Toothbrush - Dark Pink",
hn:"कोडोमो सॉफ्ट एंड स्लिम टूथब्रश डार्क पिंक"
}

and i want to perform query like this,

{

"query": {
"nested": {
"path": "products",
"query": {
"bool": {
"must": [
{
"match": {
"products.name": "Kodomo Soft & Slim Toothbrush"
}
}
]
}
}
}
}
}

but i get no result , how can i do query like this please help.Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.