typesense / firestore-typesense-search

Firebase Extension to automatically push Firestore documents to Typesense for full-text search with typo tolerance, faceting, and more
https://extensions.dev/extensions/typesense/firestore-typesense-search
Apache License 2.0
150 stars 27 forks source link

Add option to map field names #49

Open guenth39 opened 1 year ago

guenth39 commented 1 year ago

Description

I would like to have the option to map the field names from firestore to other field names in the typsense collection. As an example, the field id is called id in firestore and typsense, but the firestore field ownerId should be called userId in typsense. To achieve this, you could modify the field Firestore Collection Fields in the typsense extension configuration to accept the following syntax and of course update the sync cloud functions to handle it.

# Previously 
id, ownerId, date

# Future 
id, ownerId=userId, date