I arrive to the same issue, is there any advance or update on this ?
If I have the two solrs cores and I set one as read only, can I reindex to the second one and then just swap them?
Or there is any issue with that ?- π«π·France duaelfr Montpellier, France
Hi @mkalkbrenner and thanks for your work here!
I was trying to solve this using a dead simple trick that was to use env vars to set the core name in the settings.local.php.
I was hoping to be able to run a drush sapi-i call with the env var but as this rely on the search_api_item database table, I wasn't able to do that that simply.
Would you provide some guidance either to find a workaround or implement that swapping feature in the module, please? I'm willing to provide a patch but I'm not sure I wouldn't loose myself without at least a starting point.
Thanks again! - π©πͺGermany mkalkbrenner π©πͺ
Basically you need to configure two search_api servers, having identical search_api indexes. (For sure the IDs will be different).
You could name one server "search server", the other one "index server".
The search server indexes should be set to read only and all search views should be configured to use this one.Both servers should be configured to use their own Solr core or Solr Cloud collection.
Now you can use The SWAP command from the Solr Core API or work with ALIAS from the Solr Collection API to perform the swap.