Populating `id_search` Field in Typesense Firestore Extension

TLDR Vera asked for guidance on automatically populating a custom field in a Typesense Firestore extension. Jason advised creating a new field from the application when creating the Firestore document and then sync that field into Typesense.

Powered by Struct AI


Join the chat
Jul 03, 2023 (5 months ago)
Photo of md5-9705f56a1717a43e33fa1a08fce4c4ba
01:10 AM
any suggestions on how to get the Typesense firestore extension to automatically populate a field like id_search in my Typesense cluster? The only way i can save the id in the extension configuration is byte writing <other fields>, id, <more fields>. but then the extension can’t map that id onto the custom id_search field i have in Typesense, because i know the id field is special and i cant search by it, so it has to be named something different.
Photo of md5-8813087cccc512313602b6d9f9ece19f
02:01 AM
The extension cannot remap fields on the fly. So you would have to create this new field from your application when you create the document in Firestore and sync that field into Typesense