Assuming you have an existing standard replica called “price_asc” and the current settings on the primary index are: replicas: ['price_asc']
. You can send the current settings to migrate the standard replica to a virtual one with minimal down time and no changes on the front-end, by just adding the word virtual
and wrapping the index name in parentheses using the setSettings method (e.g. in JavaScript):
index.setSettings({
replicas: [
'virtual(price_asc)'
]
}).then(() => {
// done
});
This is only possible using the API, and not through the Dashboard.
More information about creating virtual replicas can be found here