Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert configuration in tables to config files #41

Open
herbdool opened this issue Jan 10, 2023 · 3 comments
Open

Convert configuration in tables to config files #41

herbdool opened this issue Jan 10, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@herbdool
Copy link
Contributor

herbdool commented Jan 10, 2023

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 and search_api_server tables which appear to be tables set up with ctools for exporting/importing in d7. (Same for facet_api table).

It could get complicated with the search_api_db_* tables which need to be recreated if deployed.

@herbdool herbdool added the enhancement New feature or request label Jan 10, 2023
@herbdool
Copy link
Contributor Author

herbdool commented Feb 2, 2023

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.

@argiepiano
Copy link
Contributor

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.

@herbdool
Copy link
Contributor Author

The holy grail is to have them as Config objects though, I think. Then get all the benefits of regular config objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants