Hi! I have a question about Synonyms. Whats the ...
# community-help
j
Hi! I have a question about Synonyms. Whats the best practice for getting a list of synonyms to persist each time a collection is updated from a new alias?
j
This is indeed a little painful to manage at the moment. You would have to export the synonyms from the old collection using the API and then import them into the new collection
We plan to solve this by making synonym lists be shared across collections
r
when would we be able to expect this fix to go out?
j
It’s currently in the backlog and is not scheduled for the near future, given other priorities. So we don’t have an ETA for it currently
j
ok. this is manageable but yeah we would love to have synonyms shared across our collections and to persist on collection updates.
j
We prioritize based on community feedback though, so could you open a Github issue so we can track interest?
j
sure!
🙏 1
can I upload an entire synonyms array, or do I have to upsert by one set of synonyms at a time? The docs only show the latter:
client.collections('products').synonyms.upsert('smart-phone-synonyms', synonym)
j
You would have to upsert one by one
😬 1
j
ouch! ok
I’m a bit nervous there will be a short delay between the time an alias changes and the time the synonyms are updated.
j
I would recommend adding the synonyms to the new collection before switching the alias
👍 2
d
Adding to this, what permissions does an API key need to manage synonyms? I thought
Copy code
"actions": ["collections:*"]
would do it but that didn't seem to work. Is it a separate action?
j
Yeah, it should be synonyms:*
d
thanks!
j
Hi! Just wondering if we still need to re-upload these, or if there is a way for them to persist? cc @Colin Tatro
j
Hi Jon, you still have to reupload synonyms when you create a new collection.