#community-help

Checking Field Existence in Typesense

TLDR Saurabh wanted to check field existence in Typesense, and Jason suggested indexing a new field fieldA_exists as a workaround.

Powered by Struct AI

1

1

4
5mo
Solved
Join the chat
May 11, 2023 (5 months ago)
Saurabh
Photo of md5-57be9cd26696982f7dd2392eff28df99
Saurabh
06:39 PM
hey all ,
how to check if field exists in typsense ?

1

Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:52 PM
There’s no way to check for the absence or presence of fields in Typesense directly.

So you would have to create a new field called say fieldA_exists: true | false and set that at indexing time to be able to query with it later
Saurabh
Photo of md5-57be9cd26696982f7dd2392eff28df99
Saurabh
08:23 PM
thanks Jason for helping me out...

1

08:23
Saurabh
08:23 PM
Ajay