#community-help

Querying Optional Fields with Non-null Values

TLDR Max asked about querying documents where an optional field is not null. Jason shared a prior discussion link and stated there's no direct filter for null values.

Powered by Struct AI
+11
white_check_mark1
4
6mo
Solved
Join the chat
Mar 23, 2023 (6 months ago)
Max
Photo of md5-d7f4aa44e3d4866e8b7a38eceb9af762
Max
02:16 PM
Hi ! I would like to query_by a field that is optional. So in the index, the documents where the field=null do not have the field at all. How to query_by where field is not null ?
02:19
Jason
02:19 PM
There’s no filter by null values otherwise directly
white_check_mark1
Max
Photo of md5-d7f4aa44e3d4866e8b7a38eceb9af762
Max
03:24 PM
Thanks!
+11