I want to write a query inside should such that when both matches the document then i will boost the score by 2 but when any one of them or none of them matches i do not want any boost my code is given below now can anyone please tell me how should i write my "Should" query so that i can do my work.
query: {
bool: {
must: {
query_string: {
query: shop_search,
fields: ['shop_name'],
boost: 3.0
}
}, should: [
{
term : { 'address.area2' : search_area2 }
},
{
term : { "address.area1" : search_area1 }
}
], "boost": 2.0
}
}