Hey guys! good morning! I'm receiving an empty opt...
# community-help
m
Hey guys! good morning! I'm receiving an empty option in some of the filters from Algolia, I think is actually expected as some records could have this field as empty/null, I wonder how could we filter_by this field as an empty/null string? this is the request we're sending but we get no results even though there are 3 records that match.
<https://0b3w9ohegr1sljm6p-1.a1.typesense.net/collections/appointment_development/documents/search?query_by=confirmation_id,purchase_order_identifiers&num_typos=0&exhaustive_search=true&highlight_full_fields=confirmation_id,purchase_order_identifiers&q=*&facet_by=arrival_time,facility_name,checkin_status,scheduler_name,equipment_type_id,status,appointment_type_name,created_by_name&filter_by=equipment_type_id:=''&max_facet_values=10&page=1&per_page=25>
j
@Mateo Salazar Typesense is unable to match on empty values, even though it facets on them. I would recommend setting empty strings to something like “Unknown” or “N/A” so it’s string, then be able to filter on it
m
Got it, is there a way to check if these 3 elements it says exists with an empty value in this field actually exists and are present in this collection in Typesense? We're using the Typesense server and Typensense cloud
j
Not by querying Typesense directly… I’d recommend querying your primary datastore
m
I tried this but did not find any record with that field as null in our dev DB, maybe I need to reindex and see if they're gone
j
Another way could be to export the documents from the collection using the export endpoint, and then search through the JSONL file
m
That's a good idea, which is the export endpoint?
m
Thanks Jason with this approach we were able to resolve the problem!
👍 1