Hey guys,
we have an product index with a nested field "dates". Let's say we put a product in it by:
PUT products/basics/1
{
"sku" : "12345",
"title" : "test product",
"image" : "test_high.jpg",
"productmanager": "none",
"dates":[
{
"date-origin": "01.01.2018",
"date-destination": "10.01.2018",
"instock": 1
},
{
"date-origin": "20.01.2018",
"date-destination": "30.01.2018",
"instock": 0
}
]
}
Now if we want to update it by doing this again with changed values and one missing nested object...like:
PUT products/basics/1
{
"sku" : "12345",
"title" : "test product new",
"image" : "test_high_new.jpg",
"productmanager": "someone",
"dates":[
{
"date-origin": "01.01.2018",
"date-destination": "10.01.2018",
"instock": 1
}
]
}
...the second object in "dates" will not be deleted...
How could i tell ES to delete the missing nested objects when updating the document?
Thank you!