Hi,
How to store ecommerce set/nonset products in elasticsearch with aggregation,sort,search.
currently I am using parent-child relationship with it, but for aggregation and sort it need to store merged values in the parent.that is not working well with proper aggregation count.So it doesn't satisfy my requirement.
Current schema is as follow,
Parent .
{
_id: "s113",
name: "sample product set",
"mrps" :[
100,
200
]
}
Children
{
_id:"c100",
parent: "s113",
name: "sample product set",
"mrp":100
},
{
_id:"c101",
parent: "s113",
name: "sample product set",
"mrp" : 100
},
{
_id:"c102",
parent: "s113",
name: "sample product set",
"mrp" :200
},
{
_id:"c103",
parent: "s113",
name: "sample product set",
"mrp": 200
}
I am performing aggregation,sort and search on parent and filtering done at child to fetch single client.