I’m having an issue with <gatsby-plugin-typesense>...
# community-help
m
I’m having an issue with gatsby-plugin-typesense where the plugin keeps creating new collections while deleting old collections. Because of this, all synonyms are being deleted along with the old collection. Each time there is a new deploy, I see a message saying “Typesense Content indexed.” I’ve been trying to debug this for weeks, and can’t figure out how to upsert into the collection instead of rewriting the collection entirely. Thank you for any assistance you can provide.
j
The plugin deletes and creates new collections each time. Happy to entertain a PR that also copies synonyms and curation rules over from the old collection to the new collection, before it deletes the old collection
m
Thank you for clarifying. Why is deleting the old collection necessary? There’s no method to update an existing collection? As you can probably tell I am a novice with this. Where would I start with figuring out how to copy synonyms / curation rules before deleting old collection. I wanna learn.
j
We create a new collection on each deploy, so that in case the structure of the data changes, it's automatically handled on the next reindex
Synonym endpoints are documents here: https://typesense.org/docs/26.0/api/synonyms.html Curation endpoints are documented here: https://typesense.org/docs/26.0/api/curation.html You would have to a GET /synonyms from the old collection and then upsert them into the new collection. Same for curation
🙌 1