Open eysenshi opened 3 years ago
Note to myself: docs for listening on dynamic paths: https://firebase.google.com/docs/functions/firestore-events#wildcards-parameters
@jasonbosco, this extension supports subcollection paths? (ie. cities/{cityId}/landmarks
)
Subcollection like "cities/{cityId}/landmarks" worked for me on indexToTypesenseOnFirestoreWrite
but not on backfill: backfillToTypesenseFromFirestore
. Basically the backfill function runs without error but no record is imported.
@jasonbosco Any plans to implement this? I would really need this feature!
The issue should be fixed by changing this line in the backfill cloud function
https://github.com/typesense/firestore-typesense-search/blob/44e01a71bb881a60eea7f016ed53c577fefe2e99/functions/src/backfillToTypesenseFromFirestore.js#L43-L44
In the case of a subcollection, we have to use collectionGroup
instead of collection.
Description
This is a request to support backfill all subcollections return from a collection group query. This could be helpful in use case like, backfill landmarks data from all cities under path:
cities/{cityId}/landmarks
.