One filter depends on another filter

we're currently developing a project for our company using ElasticSearch. However we are at a hurdle and need your help;

our columns are start_date, finish_date, min_value, max_value

if start_date and finish_date have no entry we want it automatically return 'true', however if there is an entry among start_date and finish_date we want to determine if its 'true' or 'false' according to the min_value and max_value that we've predetermined

We've tried this logic to offset our problem however it didn't work.

{
nested:
{
path: "restriction_intervals",
query:
{
filtered:
{
filter:
{
bool: {
should: [
{
not: {
and: [
{
range: {
"restriction_intervals.start_date": {
lte: 50
}
}
},
{
range: {
"restriction_intervals.finish_date": {
gte: 50
}
}
}
]
}
},
{
and: [
{
range: {
"restriction_intervals.start_date": {
lte: 50
}
}
},
{
range: {
"restriction_intervals.finish_date": {
gte: 50
}
}
},
{
range: {
"restriction_intervals.min_value": {
lte: 4
}
}
},
{
range: {
"restriction_intervals.max_value": {
lte: 4
}
}
}
]
}
]
}
}
}
}
}
}

We look forward to your suggestions. Thank you.