You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got the multi-tenant functionality set up with a couple of test tenants.
I installed the Algolia plugin, and as expected, only the default database was pushed to Algolia.
The assumption is I will need to spin up a multi-tenant version of the Algolia plugin.
My first attempt at this was to create a new Subscriber that would spin through the configured tenants and push the products to Algolia.
My problem is - the product service (as well as the search service) is already created and passed to the constructor in the injected dependencies when the SEARCH_INDEX_EVENT is fired/emitted - and that product service is for the default database.
How do I get a separate product service for each tenant so I can get the list of products pushed to Algolia using a tenant-specific index? Is there a way to set what connection the product service uses on the fly?
Once I've got the products pushed to Algolia, the same question comes up with the search service. I suspect that might be somewhat easier as I could override the current search service (or Algolia plugin) and add functionality to direct queries to a tenant specific index.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've got the multi-tenant functionality set up with a couple of test tenants.
I installed the Algolia plugin, and as expected, only the default database was pushed to Algolia.
The assumption is I will need to spin up a multi-tenant version of the Algolia plugin.
My first attempt at this was to create a new Subscriber that would spin through the configured tenants and push the products to Algolia.
My problem is - the product service (as well as the search service) is already created and passed to the constructor in the injected dependencies when the SEARCH_INDEX_EVENT is fired/emitted - and that product service is for the default database.
How do I get a separate product service for each tenant so I can get the list of products pushed to Algolia using a tenant-specific index? Is there a way to set what connection the product service uses on the fly?
Once I've got the products pushed to Algolia, the same question comes up with the search service. I suspect that might be somewhat easier as I could override the current search service (or Algolia plugin) and add functionality to direct queries to a tenant specific index.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions