-
Notifications
You must be signed in to change notification settings - Fork 27
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
Added field in under Extension configuration did not trigger Typesense update #75
Comments
When you changed the extension configuration, could you confirm that Firebase re-deployed both the backfill function and the indexingOnWrite function? Could you try re-installing the extension from scratch with the new field added, and see if that helps? Also, do you see any logs in the backfill functions in the Firebase web console, showing any errors? |
Apologies I said there was no attempt by the extension function to update. I couldn't find anything under indexToTypesenseOnFirestoreWrite function log, but now I found below under backfillToTypesenseFromFirestore function log. Let me know if you find something below, and still want me to try re-installing. I probably will try with a new, smaller setup as I don't want to disrupt the live app. --- backfilling function triggered ---
Following that is an error:
Then these two messages:
And this error again:
|
Ah this is because during a backfill, we do We didn't account for this use-case of backfilling a 2nd time when a new field is added to an existing collection. Will push out an update for this shortly. |
Yay! Thanks for arranging update for this. That would be very useful. A kind note, please also take into account the user-case that a field is removed (if that's not too much to ask). |
Could you try installing this pre-release version of the extension and let me know how it goes:
Yup, |
I did, below steps and result.
Edit: no logs available |
This is expected, because only after the extension is installed, it starts listening for the creation of the typesense_sync backfill collection. It does not look at an existing typesense_sync collection.
This is also expected, since the backfill only runs when explicitly triggered by creating the typesense backfill collection. It does not run automatically when the extension is re-configured / installed / re-installed. So it sounds like things are working as designed, since all docs in Typesense now have 3 fields in Step 10? |
Yes. I also tried to remove one field in config, and all work out as expected. Thanks for your lightning-fast communication and implementation! |
Happy to help! And thank you for all the feedback. I'll publish this version live shortly. |
Description
Added field in under Extension configuration did not trigger document updates in Typesense
Steps to reproduce
Under Extension Configuration in Firebase extension, add a field to the existing list of fields under "Firestore Collection Fields (Optional)".
Expected Behavior
Expect the /typesense_sync/backfill/trigger:true collection takes care of the change.
Actual Behavior
There was no attempt by the extension function to update any document in Typesense. Tried to remove and recreate the backfill collection, still nothing. The change is only reflected when a document is actually updated in firebase.
Metadata
Typesense Version: <1.2.0
OS: MacOS 14.2.1 (23C71)
The text was updated successfully, but these errors were encountered: