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
155 stars 29 forks source link

Fix backfill for subcollections #52

Open guenth39 opened 1 year ago

guenth39 commented 1 year ago

Change Summary

With these changes, the backfill will now work also for subcollections, not only for "root" collection. If the collection path is something like users/{userId}/items the sync has already worked, but the backfill did not as the documents were queried with this collection path, but that did not work. Instead, we use the collectionGroup feature now with only the last part of the path.

Closes #17

PR Checklist

bokzor commented 1 year ago

Hi, Any chance to merge that MR ?

marcelweigle commented 1 year ago

Hey, any Chance to get this merged soon? This feature is really needed and the PR looks good for me. This is blocking my migration from Algolia to typesense.

LincolnRychecky commented 1 year ago

I am also being blocked by this. The sooner this can get merged the better.

jasonbosco commented 1 year ago

@guenth39 Could you add test cases for this PR?

bokzor commented 1 year ago

In case you don't want to wait this MR to be merged. You can directly modify the cloud function via the google console. https://console.cloud.google.com/functions/list

And replace the backfill function with : https://github.com/Bobbele-Ideas/firestore-typesense-search/blob/Fix-backfill-for-subcollections/functions/src/backfillToTypesenseFromFirestore.js

bokzor commented 7 months ago

@jasonbosco

Any update on this issue ? In multi tenants application this features is mandatory.

Ihatetomatoes commented 7 months ago

+1 on this one, would be great to be able to backfill sub-collections.

Jad31 commented 3 months ago

Hey, any update on this issue? I'd be glad to help if needed.

jasonbosco commented 3 months ago

Thanks @Jad31. We're essentially missing tests for this PR, and now branch conflicts. Feel free to branch off of this branch and submit a new PR