How to delete data based on condition from elastic search index using RestHighLevelClient in spring boot. for example from below example i want to delete from "companyaddress" based on condition -> "main_phone1" : "1"
"_index" : "es_52_companydetails_index",
"_type" : "_doc",
"_id" : "3",
"_score" : 1.0,
"_source" : {
"company_id" : "3",
"company_name" : "DEFG",
"companyaddress" : [
{
"address3" : "smp1",
"main_phone1" : "1"
},
{
"address3" : "chtp2",
"main_phone1" : "2"
},
{
"address3" : "gmd",
"main_phone1" : "3"
},
{
"address3" : "tste",
"main_phone1" : "4"
}
]
}