I will receive the filter inputs from the front-end some may be null or empty but in the elasticsearch query filter all the field should be present . How to get response even the inputs are empty for some filters ?
{
"query": {
"bool": {
"must": {
"match": {
"Abstract": "cancer"
}
},
"filter": [
{
"term": {
"Publication Type": "Review"
}
},
{
"range": {
"Date Completed": {
"gte": "1800",
"lte": "2017",
"format": "yyyy"
}
}
}
]
}
}
}