Typesense Multi-Tenant Updates & Webhooks
TLDR Campbell sought methods for detecting changes in Typesearch index and webhook. Jason recommended using last updated timestamp and triggering a webhook from the primary datastore.
Feb 24, 2023 (10 months ago)
We're adding a unixtimestamp value to each doc so that we know the last time it was update, so we can simply query the index using a 'since' argument to get any changes, but I'm wondering if there's a more efficient way to handle this?
Is there a way to determine when the index as a whole was lasted updated? Maybe we can add a collection with a doc and timestamp that we update any time a doc is updated, and we just query that field, and if changed, we query the product collections to get changes.
Even better, has anyone created a webhook capability that would fire any time the index is updated?
You’ll find other options mentioned in that article…
You could sort desc by the
sincefield you mentioned
I’d imagine you would need a webhook / trigger to fire from your primary datastore right? Not on the Typesense side?
Indexed 3015 threads (79% resolved)
Handling Order of Firestore Events for Synchronization with Typesense.
Ross ran into an issue with Firestore events triggering out of order, causing synchronization inconsistency between Firestore and Typesense. With advice and input from Jason and Kishore Nallan, they implemented a debouncing solution using redis, ensuring that the latest Firestore data is synced to Typesense accurately.
Troubleshooting 409 Errors with Firestore to Typesense Cloud Function
Orion encounters 409 errors with `ext-firestore-typesense-search-indexToTypesenseOnFirestoreWrite` cloud function. Jason suggests possible solutions like querying Firestore on each change or tracking sync state in a collection. Both agreed on adding a config option. Orion proposed contributing a PR for the change.
Typesense Firestore Real-Time Update Query
DomijKu required help with real-time updates on frontend when backends changes occur. Jason, CaptainCodeman and Loic explained triggering updates via direct subscription to Firestore, cloud function triggers, and stream subscriptions. Loic recommended switching to Typesense for searches beyond 20 documents.
Troubleshooting Typesense Document Import Error
Christopher had trouble importing 2.1M documents into Typesense due to memory errors. Jason clarified the system requirements, explaining the correlation between RAM and dataset size, and ways to tackle the issue. They both also discussed database-like query options.
Troubleshooting 400 Error When Upgrading Typesense Firestore Extension
Orion experienced a `400` error after updating the Typesense Firestore extension, causing issues with cloud functions. They traced the issue back to a data type conflict in their Typesense collection schema after updating. With help from Jason and Kishore Nallan, they resolved the issue by recreating the collection.