diff --git a/config/schema/search_api.index.schema.yml b/config/schema/search_api.index.schema.yml index daa2fc1..bec9eb0 100644 --- a/config/schema/search_api.index.schema.yml +++ b/config/schema/search_api.index.schema.yml @@ -78,14 +78,14 @@ search_api.index.*: label: 'Index items immediately' datasource_settings: type: sequence - label: 'Datasource plugin IDs' + label: 'Datasource settings' sequence: type: mapping label: 'A datasource' mapping: plugin_id: type: string - label: 'The plugin ID of the datasource' + label: 'The plugin ID of the datasource config' settings: type: plugin.plugin_configuration.search_api_datasource.[%parent.plugin_id] tracker_settings: diff --git a/src/Entity/Index.php b/src/Entity/Index.php index 044418e..c06b47f 100644 --- a/src/Entity/Index.php +++ b/src/Entity/Index.php @@ -338,6 +338,7 @@ class Index extends ConfigEntityBase implements IndexInterface { if (!$only_enabled) { return $this->datasourcePlugins; } + return array_intersect_key($this->datasourcePlugins, array_flip(array_keys($this->datasource_settings))); }