This happens with APP 7.10.0 and API 2.6.0.
When using logical operator "OR" with filter query parameters in a API request, the response include results satisfying only the first predicate thus ignoring the OR and the second part.
content_max_age set to 2020-10-15content_max_age left blank (thus saved in DB as null){{ENDPOINT}}/_/items/banner_item?filter[content_max_age][eq]=2020-10-15&filter[content_max_age][logical]=or&filter[content_max_age][null]{{ENDPOINT}}/_/items/banner_item?filter[content_max_age][eq]=2020-10-15&filter[content_max_age][logical]=or&filter[content_max_age][empty]The API response body should include:
content_max_age set to 2020-10-15)content_max_age left blank - null in database)The API response body includes only:
content_max_age set to 2020-10-15)

Hello @lucianospi
Please try with below filters :
Logical operator for same field : {{ENDPOINT}}/_/items/banner_item?filter[content_max_age][0][eq]=2020-10-15&filter[content_max_age][1][logical]=or&filter[content_max_age][1][null]
Logical operator for different fields : {{ENDPOINT}}/_/items/banner_item?filter[content_max_age][eq]=2020-10-15&filter[id][logical]=OR&filter[id][in]=1,2
@lucianospi - May I please have an update on the solution which is provided by @itsmerhp ?
@lucianospi - 馃敂


Hello guys, apologises for the late feedback. I had a go with the suggestions provided by @itsmerhp . Unfortunately none worked.
As you can see in the screenshots, there are existing elements with field "content_max_age" set as null. However that is not returned when using the logical operator OR in the filters.
Hei guys, got an update on this.
I realises inverting the order of the filter parameters it works! Just as mentioned by @itsmerhp but with a little change:
This call will return valid results:
{{ENDPOINT}}/_/items/banner_item?filter[content_max_age][0][null]&filter[content_max_age][1][logical]=or&filter[content_max_age][1][gte]=2020-02-19

while this one will not return results
{{ENDPOINT}}/_/items/banner_item?fields=content_max_age,id&filter[content_max_age][0][eq]=2020-10-15&filter[content_max_age][1][logical]=or&filter[content_max_age][1][null]

Basically the query param with the NULL value must be the first one of the phrase!
Thank you for all your support!
Awesome! Can we get this added to the docs?
@directus/api ?
Most helpful comment
Hei guys, got an update on this.
I realises inverting the order of the filter parameters it works! Just as mentioned by @itsmerhp but with a little change:
This call will return valid results:
{{ENDPOINT}}/_/items/banner_item?filter[content_max_age][0][null]&filter[content_max_age][1][logical]=or&filter[content_max_age][1][gte]=2020-02-19
while this one will not return results

{{ENDPOINT}}/_/items/banner_item?fields=content_max_age,id&filter[content_max_age][0][eq]=2020-10-15&filter[content_max_age][1][logical]=or&filter[content_max_age][1][null]
Basically the query param with the NULL value must be the first one of the phrase!
Thank you for all your support!