From f4757a92f8b617fba8ffb99ab5f604c788cf49ba Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Thu, 9 Aug 2018 14:36:30 -0500 Subject: [PATCH 1/5] Add schema and default settings config to module. --- ...api_federated_solr.search_app.settings.yml | 15 ++++++ .../search_api_federated_solr.schema.yml | 51 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 config/install/search_api_federated_solr.search_app.settings.yml create mode 100644 config/schema/search_api_federated_solr.schema.yml diff --git a/config/install/search_api_federated_solr.search_app.settings.yml b/config/install/search_api_federated_solr.search_app.settings.yml new file mode 100644 index 000000000..4dc15b916 --- /dev/null +++ b/config/install/search_api_federated_solr.search_app.settings.yml @@ -0,0 +1,15 @@ +facet: + site_name: + set_default: false +index: + id: '' + has_site_name_property: false + server_url: '' +content: + no_results: '' + search_prompt: '' +results: + rows: null +pagination: + buttons: null +path: /search-app diff --git a/config/schema/search_api_federated_solr.schema.yml b/config/schema/search_api_federated_solr.schema.yml new file mode 100644 index 000000000..f8b4e8c29 --- /dev/null +++ b/config/schema/search_api_federated_solr.schema.yml @@ -0,0 +1,51 @@ +# Schema for configuration files of the Search API Federated Solr module. + +search_api_federated_solr.search_app.settings: + type: config_object + label: 'Search API Federated Solr settings' + mapping: + path: + type: string + label: 'The path for the search app.' + facet: + type: mapping + mapping: + site_name: + type: mapping + mapping: + set_default: + type: boolean + label: 'When true, only search results from this site will be shown.' + index: + type: mapping + mapping: + id: + type: string + label: 'Defines which search_api index and server the search app should use.' + has_site_name_property: + type: boolean + label: 'Has site name flag.' + server_url: + type: string + label: 'The server url for the search app.' + content: + type: mapping + mapping: + no_results: + type: string + label: 'This text is shown when a query returns no results.' + search_prompt: + type: string + label: 'This text is shown when no query term has been entered.' + results: + type: mapping + mapping: + rows: + type: integer + label: 'The max number of results to render per search results page.' + pagination: + type: mapping + mapping: + buttons: + type: integer + label: 'The max number of numbered pagination buttons to show at a given time.' From 5f690b20b2bf558dc7d0907acae1434beeb8faba Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Mon, 20 Aug 2018 08:47:26 -0500 Subject: [PATCH 2/5] Add username and password to the schema. --- .../search_api_federated_solr.search_app.settings.yml | 2 ++ config/schema/search_api_federated_solr.schema.yml | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/config/install/search_api_federated_solr.search_app.settings.yml b/config/install/search_api_federated_solr.search_app.settings.yml index 4dc15b916..9c1c11c91 100644 --- a/config/install/search_api_federated_solr.search_app.settings.yml +++ b/config/install/search_api_federated_solr.search_app.settings.yml @@ -5,6 +5,8 @@ index: id: '' has_site_name_property: false server_url: '' + username: '' + password: '' content: no_results: '' search_prompt: '' diff --git a/config/schema/search_api_federated_solr.schema.yml b/config/schema/search_api_federated_solr.schema.yml index f8b4e8c29..905e7ca55 100644 --- a/config/schema/search_api_federated_solr.schema.yml +++ b/config/schema/search_api_federated_solr.schema.yml @@ -28,6 +28,12 @@ search_api_federated_solr.search_app.settings: server_url: type: string label: 'The server url for the search app.' + username: + type: string + label: 'Basic Auth username.' + password: + type: string + label: 'Basic Auth password.' content: type: mapping mapping: From c7e6f6351e53f854138f3e41763ca08ba36f0044 Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Thu, 30 Aug 2018 11:48:58 -0500 Subject: [PATCH 3/5] Add schema for field and api processor. --- config/schema/federated_terms.schema.yml | 21 +++++++++++++++++++ ...ch_api_federated_solr.processor.schema.yml | 21 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 config/schema/federated_terms.schema.yml create mode 100644 config/schema/search_api_federated_solr.processor.schema.yml diff --git a/config/schema/federated_terms.schema.yml b/config/schema/federated_terms.schema.yml new file mode 100644 index 000000000..9d65ecffe --- /dev/null +++ b/config/schema/federated_terms.schema.yml @@ -0,0 +1,21 @@ +field.storage_settings.federated_terms: + type: mapping + label: 'Federated Term settings' + mapping: + max_length: + type: integer + label: 'Maximum length' + is_ascii: + type: boolean + label: 'Contains US ASCII characters only' + +field.widget.settings.federated_terms_textfield: + type: mapping + label: 'Federated Terms Textfield' + mapping: + size: + type: integer + label: 'Size of textfield' + placeholder: + type: label + label: 'Placeholder' diff --git a/config/schema/search_api_federated_solr.processor.schema.yml b/config/schema/search_api_federated_solr.processor.schema.yml new file mode 100644 index 000000000..25d3238f1 --- /dev/null +++ b/config/schema/search_api_federated_solr.processor.schema.yml @@ -0,0 +1,21 @@ +search_api.property_configuration.federated_field: + type: mapping + label: 'Federated fields configuration' + mapping: + field_data: + type: sequence + label: 'The fields to be aggregated' + sequence: + type: sequence + label: 'The entity type' + sequence: + type: string + label: 'The bundle type' + +search_api.property_configuration.site_name: + type: mapping + label: 'Site name processor configuration' + mapping: + site_name: + type: string + label: 'The name of the site' \ No newline at end of file From c6a210083463a2c2fd9d0dc2695ffee8f51605ac Mon Sep 17 00:00:00 2001 From: Avi Schwab Date: Thu, 20 Sep 2018 16:29:48 -0500 Subject: [PATCH 4/5] Update names (for posterity, before we move them) --- config/schema/federated_terms.schema.yml | 8 ++++---- .../schema/search_api_federated_solr.processor.schema.yml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/schema/federated_terms.schema.yml b/config/schema/federated_terms.schema.yml index 9d65ecffe..5c9f6940c 100644 --- a/config/schema/federated_terms.schema.yml +++ b/config/schema/federated_terms.schema.yml @@ -1,6 +1,6 @@ -field.storage_settings.federated_terms: +field.storage_settings.mapped_terms: type: mapping - label: 'Federated Term settings' + label: 'Mapped Term settings' mapping: max_length: type: integer @@ -9,9 +9,9 @@ field.storage_settings.federated_terms: type: boolean label: 'Contains US ASCII characters only' -field.widget.settings.federated_terms_textfield: +field.widget.settings.mapped_terms_textfield: type: mapping - label: 'Federated Terms Textfield' + label: 'Mapped Terms Textfield' mapping: size: type: integer diff --git a/config/schema/search_api_federated_solr.processor.schema.yml b/config/schema/search_api_federated_solr.processor.schema.yml index 25d3238f1..745a9e742 100644 --- a/config/schema/search_api_federated_solr.processor.schema.yml +++ b/config/schema/search_api_federated_solr.processor.schema.yml @@ -1,6 +1,6 @@ -search_api.property_configuration.federated_field: +search_api.property_configuration.mapped_field: type: mapping - label: 'Federated fields configuration' + label: 'Mapped fields configuration' mapping: field_data: type: sequence @@ -18,4 +18,4 @@ search_api.property_configuration.site_name: mapping: site_name: type: string - label: 'The name of the site' \ No newline at end of file + label: 'The name of the site' From 9e2c69446d1c73e94b8a438b049da9dd80ac8afd Mon Sep 17 00:00:00 2001 From: Avi Schwab Date: Thu, 20 Sep 2018 17:11:45 -0500 Subject: [PATCH 5/5] Move relevant schema to search_api_field_map --- config/schema/federated_terms.schema.yml | 21 ------------------- ...ch_api_federated_solr.processor.schema.yml | 21 ------------------- 2 files changed, 42 deletions(-) delete mode 100644 config/schema/federated_terms.schema.yml delete mode 100644 config/schema/search_api_federated_solr.processor.schema.yml diff --git a/config/schema/federated_terms.schema.yml b/config/schema/federated_terms.schema.yml deleted file mode 100644 index 5c9f6940c..000000000 --- a/config/schema/federated_terms.schema.yml +++ /dev/null @@ -1,21 +0,0 @@ -field.storage_settings.mapped_terms: - type: mapping - label: 'Mapped Term settings' - mapping: - max_length: - type: integer - label: 'Maximum length' - is_ascii: - type: boolean - label: 'Contains US ASCII characters only' - -field.widget.settings.mapped_terms_textfield: - type: mapping - label: 'Mapped Terms Textfield' - mapping: - size: - type: integer - label: 'Size of textfield' - placeholder: - type: label - label: 'Placeholder' diff --git a/config/schema/search_api_federated_solr.processor.schema.yml b/config/schema/search_api_federated_solr.processor.schema.yml deleted file mode 100644 index 745a9e742..000000000 --- a/config/schema/search_api_federated_solr.processor.schema.yml +++ /dev/null @@ -1,21 +0,0 @@ -search_api.property_configuration.mapped_field: - type: mapping - label: 'Mapped fields configuration' - mapping: - field_data: - type: sequence - label: 'The fields to be aggregated' - sequence: - type: sequence - label: 'The entity type' - sequence: - type: string - label: 'The bundle type' - -search_api.property_configuration.site_name: - type: mapping - label: 'Site name processor configuration' - mapping: - site_name: - type: string - label: 'The name of the site'