-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support backfill documents in subcollections #17
Comments
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. |
Subcollection like "cities/{cityId}/landmarks" worked for me on |
@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 firestore-typesense-search/functions/src/backfillToTypesenseFromFirestore.js Lines 43 to 44 in 44e01a7
In the case of a subcollection, we have to use collectionGroup instead of collection.
|
Added a PR that adds support for this in #99 with additional checks on the collection path. Concern with a quick .collectionGroup("landmarks") approach in backfill is that it may accidentally capture unrelated entities. So you not only get "cities/{cityId}/landmarks" but also "towns/{townId}/landmarks" |
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
.The text was updated successfully, but these errors were encountered: