Elastic search query to get values only which are not null

I have written a query and I want only those Actualarrival time which are not null.As per the below query I am not getting as needed.It would be helpful if someone figure out the correction.

"nested": {
"path": "Banks",
"query": {
"bool": {
"must": [
{
"match": {
"Banks.Employees.Source_Geocode.keyword": "17.337203,78.467794"
}
},
{
"match": {
"Banks.Employees.Source_Geocode.keyword": "17.367891,78.468098"
}
},
{
"exists": {
"field": "Banks.Employees.ActualArrivalTime"
}
}
]
}
}
}
}

Do you have an error or unexpected results ? Please provide logs and/or results samples.

I am getting 0 hits when used the above query.I guess it's working like if there is any null value then 0 hits is returned rather returning some of the non-null values for arrival time.

Do you have documents matching this 3 conditions in the must ? can you provide a sample and the mapping plz ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.