Open herbdool opened 1 year ago
Now I'm not so sure. The indices are entities which means they are available to Views. So they might need to stay as entities and stored in the database. Perhaps instead there could be a way to export/import the indices. Maybe the solution for Rules is an option.
These two entity types (search_api_index
and search_api_server
) are "configuration entities" provided by Entity Plus and they are exportable "out of the box". Create a search_api_index and try the following:
$i = entity_load('search_api_index', 1);
$c = entity_get_controller('search_api_index');
dpm($c->export($i));
You'll get a JSON output.
It's possible to access this export through a UI - you have to enable Entity UI and then modify the entity definition to indicate a path.
The holy grail is to have them as Config
objects though, I think. Then get all the benefits of regular config objects.
I just realized all the indices are stored in tables so it's hard to deploy.
A start would be to start with
search_api_index
andsearch_api_server
tables which appear to be tables set up with ctools for exporting/importing in d7. (Same forfacet_api
table).It could get complicated with the search_apidb* tables which need to be recreated if deployed.