Skip to content

Instantly share code, notes, and snippets.

@edysmp
Created February 28, 2020 03:45
Show Gist options
  • Save edysmp/609a87b506a52bfb193961d155e79ee2 to your computer and use it in GitHub Desktop.
Save edysmp/609a87b506a52bfb193961d155e79ee2 to your computer and use it in GitHub Desktop.
Clone search api index
$index = search_api_index_load('default_node_index');
unset($index->id);
$index->name = 'My Index';
$index->machine_name = 'my_index';
$index->save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment