#community-help

Filtering by "Not Empty" in Databases

TLDR smileBeda and Vladimir asked about filtering by non-empty fields. Kishore Nallan explained the database doesn't record absent fields, recommending use of a placeholder instead.

Powered by Struct AI

2

1

3
3w
Solved
Join the chat
Nov 05, 2023 (3 weeks ago)
smileBeda
Photo of md5-fcf544c83718910cbe7819433c2cc484
smileBeda
08:05 AM
Is there a way to filter by “not empty”?
referring to 'filter_by': 'field_name:!=' (in this case I am attempting to get all results where this field is not empty, but it tells me it has to be a value…

1

Vladimir
Photo of md5-c69dd267688ebbdde448e8e7f775aa80
Vladimir
11:50 AM
Have the same question. Truly necessary to filter by optional fields.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:35 PM
We don't have a way to filter by empty/missing field value because, given the inverted index we keep for storing values, an absence of a field is simply not recorded (otherwise that consumes additional memory which is not always useful). You have to use a placeholder string/int value that conveys emptiness.

1

1