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

Fetch latest version of the doc on upsert #42

Closed OrionReed closed 1 year ago

OrionReed commented 1 year ago

Change Summary

~Adds a flag to choose wether the~ DocumentSnapshot should be pulled from a firestorm query ~or the event payload~.

Notes

This change is entirely untested (I know I know... hoping someone else can get to that, if not I will but it will be a while). I'm also not a fan of the flag name and suggestions would be welcome.

jasonbosco commented 1 year ago

Thank you for this PR @OrionReed!

I thought about what we spoke on Slack a bit more, and figured that having an inconsistent snapshot synced to Typesense is not going to be ok in any production use-cases.

So I've removed the flag and instead updated the code to pull the latest snapshot for every write.

jasonbosco commented 1 year ago

Resolves #32