From 17e8739df99b4b09f7b639efc782dbe0963dbca1 Mon Sep 17 00:00:00 2001 From: Santeri Hurnanen Date: Mon, 4 Nov 2024 09:04:20 +0200 Subject: [PATCH 1/4] UHF-10719: Update elasticsearch settings --- public/sites/default/all.settings.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/public/sites/default/all.settings.php b/public/sites/default/all.settings.php index 7cc22abf..100a1b43 100644 --- a/public/sites/default/all.settings.php +++ b/public/sites/default/all.settings.php @@ -7,13 +7,12 @@ // Elasticsearch settings. if (getenv('ELASTICSEARCH_URL')) { - $config['elasticsearch_connector.cluster.sote']['url'] = getenv('ELASTICSEARCH_URL'); + $config['search_api.server.elastic_rekry']['backend_config']['connector_config']['url'] = getenv('ELASTICSEARCH_URL'); if (getenv('ELASTIC_USER') && getenv('ELASTIC_PASSWORD')) { - $config['elasticsearch_connector.cluster.sote']['options']['use_authentication'] = '1'; - $config['elasticsearch_connector.cluster.sote']['options']['authentication_type'] = 'Basic'; - $config['elasticsearch_connector.cluster.sote']['options']['username'] = getenv('ELASTIC_USER'); - $config['elasticsearch_connector.cluster.sote']['options']['password'] = getenv('ELASTIC_PASSWORD'); + $config['search_api.server.elastic_rekry']['backend_config']['connector'] = 'basicauth'; + $config['search_api.server.elastic_rekry']['backend_config']['connector_config']['username'] = getenv('ELASTIC_USER'); + $config['search_api.server.elastic_rekry']['backend_config']['connector_config']['password'] = getenv('ELASTIC_PASSWORD'); } } From 84d982c953cec94106ab0cd087c0dff75d4f7bdd Mon Sep 17 00:00:00 2001 From: Santeri Hurnanen Date: Mon, 4 Nov 2024 09:04:21 +0200 Subject: [PATCH 2/4] UHF-10719: Use elasticsearch location data type --- conf/cmi/search_api.index.health_stations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/cmi/search_api.index.health_stations.yml b/conf/cmi/search_api.index.health_stations.yml index 3a51269c..df72eea4 100644 --- a/conf/cmi/search_api.index.health_stations.yml +++ b/conf/cmi/search_api.index.health_stations.yml @@ -24,7 +24,7 @@ field_settings: coordinates: label: Coordinates property_path: coordinates - type: object + type: location id: label: ID datasource_id: 'entity:tpr_unit' From 4d9df1a476218528ec2ee828fc22365b21f59d79 Mon Sep 17 00:00:00 2001 From: Santeri Hurnanen Date: Mon, 4 Nov 2024 10:12:15 +0200 Subject: [PATCH 3/4] UHF-10719: Export config --- .../elasticsearch_connector.cluster.sote.yml | 19 ------------------- conf/cmi/search_api.server.elastic_sote.yml | 11 ++++++++--- 2 files changed, 8 insertions(+), 22 deletions(-) delete mode 100644 conf/cmi/elasticsearch_connector.cluster.sote.yml diff --git a/conf/cmi/elasticsearch_connector.cluster.sote.yml b/conf/cmi/elasticsearch_connector.cluster.sote.yml deleted file mode 100644 index fe923cc5..00000000 --- a/conf/cmi/elasticsearch_connector.cluster.sote.yml +++ /dev/null @@ -1,19 +0,0 @@ -uuid: c0072924-a6b8-40bc-a99b-615e7ed08f8c -langcode: en -status: '1' -dependencies: { } -cluster_id: sote -name: Sote -url: 'http://elastic:9200' -options: - multiple_nodes_connection: false - use_authentication: true - authentication_type: Basic - username: '' - password: '' - timeout: 3 - rewrite: - rewrite_index: true - index: - prefix: '' - suffix: '' diff --git a/conf/cmi/search_api.server.elastic_sote.yml b/conf/cmi/search_api.server.elastic_sote.yml index bad5419a..d98a85c4 100644 --- a/conf/cmi/search_api.server.elastic_sote.yml +++ b/conf/cmi/search_api.server.elastic_sote.yml @@ -9,6 +9,11 @@ name: 'Elastic sote' description: '' backend: elasticsearch backend_config: - cluster_settings: - cluster: sote - fuzziness: auto + connector: standard + connector_config: + url: 'http://elastic:9200' + enable_debug_logging: false + advanced: + prefix: '' + suffix: '' + fuzziness: auto From 6e0c2e4ae27de7c6d0a15b37217be54c648684e0 Mon Sep 17 00:00:00 2001 From: Santeri Hurnanen Date: Tue, 5 Nov 2024 07:57:08 +0200 Subject: [PATCH 4/4] UHF-10719: Fix search_api settings --- public/sites/default/all.settings.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/sites/default/all.settings.php b/public/sites/default/all.settings.php index 100a1b43..b9f6c69f 100644 --- a/public/sites/default/all.settings.php +++ b/public/sites/default/all.settings.php @@ -7,12 +7,12 @@ // Elasticsearch settings. if (getenv('ELASTICSEARCH_URL')) { - $config['search_api.server.elastic_rekry']['backend_config']['connector_config']['url'] = getenv('ELASTICSEARCH_URL'); + $config['search_api.server.elastic_sote']['backend_config']['connector_config']['url'] = getenv('ELASTICSEARCH_URL'); if (getenv('ELASTIC_USER') && getenv('ELASTIC_PASSWORD')) { - $config['search_api.server.elastic_rekry']['backend_config']['connector'] = 'basicauth'; - $config['search_api.server.elastic_rekry']['backend_config']['connector_config']['username'] = getenv('ELASTIC_USER'); - $config['search_api.server.elastic_rekry']['backend_config']['connector_config']['password'] = getenv('ELASTIC_PASSWORD'); + $config['search_api.server.elastic_sote']['backend_config']['connector'] = 'basicauth'; + $config['search_api.server.elastic_sote']['backend_config']['connector_config']['username'] = getenv('ELASTIC_USER'); + $config['search_api.server.elastic_sote']['backend_config']['connector_config']['password'] = getenv('ELASTIC_PASSWORD'); } }