Generic Exists and Condition for Empty String for Numbers and Strings

(Elmar Weber) #1

The Exists filter at ES is also returning true for empty strings. This is for us not intended behaviour, so we simple make an and condition that combines these two. However, this is not generic as for number fields it does not work becauer the query validation fails as the term query for not equals "" is not a number. We can put the logic based on the field definition in our query, but is there maybe an option to make ES to accept a string for a number field as a term query? Or another trick to get this behavior from a filter?

(system) #2