When searching for multiple values of the same custom field, one can add the following to the query parameter of the /search endpoint:
custom_field_1234:some_value custom_field_1234:some_other_value
This will search for instances where the custom field with ID 1234 contains “some_value” or “some_other_value” - this works as expected.
When searching the same field for blank/NULL values, one can include the following to the query parameter:
-custom_field_1234:*
And, this will correctly return all instances where the field with ID 1234 has blank/NULL values.
There is an issue, however, when combining the two. Example: I need to find all instances where the values is either “some_value” or is blank:
custom_field_1234:some_value -custom_field_1234:*
This will result in only the blank values.
Is there another way to accommodate this use case?