Some information about my app:
Multi-tenancy will mean that there will be overlapping IDs for the same model.
First thing that came to my mind was to use searchkick's index_prefix
, by setting index_prefix
to the different tenant's name. But I realized that won't work because the value of index_prefix
is set when the app starts. And the same value will remain throughout.
I received a reply from the creator of searchkick that is is not possible.
https://github.com/ankane/searchkick/issues/268#issuecomment-53672954
Now I might look for some monkey patching alternatives.