Hello, i'm new on elastic search, still not understand how using query for elastic search
i have data
like this one
{
"_index" : "normal",
"_type" : "product",
"_id" : "002417",
"_score" : 0.93070257,
"_source" : {
"ListPurchasedGroupId" : [
{
"Value" : "PG.R.BKS.01"
},
{
"Value" : ""PG.R.UNC.01""
}
],
"ProductId" : "002417",
"Name" : "Richeese Bisvit Selimut Rch 20 x 11 g",
"BrandName" : "",
"PrincipalName" : "Nabati",
"Description" : "Biskuit sandwich salut krim keju",
"RelevanceName" : "biskuit",
"DtmLastUpdate" : "2019-09-16T20:59:31"
}
},
{
"_index" : "normal",
"_type" : "product",
"_id" : "002418",
"_score" : 4.82661,
"_source" : {
"ListPurchasedGroupId" : [
{
"Value" : "PG.R.BKS.01"
}
],
"ProductId" : "002418",
"Name" : "Richeese Biscuit Selimut Rch 50 x 11 g",
"BrandName" : "",
"PrincipalName" : "Nabati",
"Description" : "Biskuit sandwich salut krim keju enak",
"RelevanceName" : "biskuit",
"DtmLastUpdate" : "2019-09-16T20:59:31"
}
},
how can i select data by Description AND by ListPurchasedGroupId.Value
already trying using this
GET /normal/product/_search
{
"query": {
"bool": {
"must": [
{
"match": {
"Description" : "Keju "
}
},
{
"nested": {
"path": "ListPurchasedGroupId",
"query": {
"bool":{
"must":[
{
"match": {"ListPurchasedGroupId.Value": "PG.R.UNC.01"}
}
]
}
}
}
}
]
}
}
}
but i still got the productId 002418
this product didnt have purchasedGroupId = "PG.R.UNC.01"
how to fix it?