Skip to content

Commit 80f02d4

Browse files
authored
UHF-13035: Add paikkatieto street names to elasticsearch index (#1279)
* UHF-13035: Fix CVE-2026-40176, CVE-2026-40261, CVE-2026-6365, CVE-2026-6367, CVE-2026-6366 * UHF-13035: Remove distance based street name filtering We were having trouble where the correct street name was cut off at intersections. This change returns more street name results, which is bettern that some streets sometimes missing. * UHF-13035: Add paikkatieto street names to elasticsearch for autocomplete This replaces service map autocomplete in the react app, since paikkatieto api and service map data have slight differences. Any difference in street names makes the street unsearchable, since we match the names with keyword search. * Update street-data.sh
1 parent 6aa5ba2 commit 80f02d4

13 files changed

Lines changed: 686 additions & 175 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
uuid: 3809159c-46bf-43d9-8496-823ce93efac4
2+
langcode: en
3+
status: true
4+
dependencies:
5+
config:
6+
- search_api.server.default
7+
module:
8+
- helfi_kymp_content
9+
- helfi_react_search
10+
- helfi_recommendations
11+
id: paikkatieto_street_names
12+
name: 'Paikkatieto street names'
13+
description: 'Street names from Paikkatieto API for vehicle removal search autocomplete.'
14+
read_only: false
15+
field_settings:
16+
id:
17+
label: ID
18+
datasource_id: paikkatieto_street_name_source
19+
property_path: id
20+
type: string
21+
street_name:
22+
label: 'Street name'
23+
datasource_id: paikkatieto_street_name_source
24+
property_path: street_name
25+
type: text
26+
datasource_settings:
27+
paikkatieto_street_name_source: { }
28+
processor_settings: { }
29+
tracker_settings:
30+
default:
31+
indexing_order: fifo
32+
options:
33+
cron_limit: 500
34+
delete_on_fail: true
35+
index_directly: false
36+
track_changes_in_references: true
37+
server: default

docker/openshift/crons/street-data.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ echo "Start indexing street data from external datasource: $(date)"
55
while true
66
do
77
drush sapi-r street_data && drush sapi-i street_data --batch-size=500
8+
drush sapi-r paikkatieto_street_names
89
sleep 86400
910
done

phpstan-baseline.neon

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -170,30 +170,7 @@ parameters:
170170
count: 1
171171
path: public/modules/custom/helfi_kymp_content/src/MobileNoteDataService.php
172172

173-
-
174-
message: "#^Method Drupal\\\\helfi_kymp_content\\\\Paikkatieto\\\\PaikkatietoClient\\:\\:fetchStreetsByPoint\\(\\) return type has no value type specified in iterable type array\\.$#"
175-
count: 1
176-
path: public/modules/custom/helfi_kymp_content/src/Paikkatieto/PaikkatietoClient.php
177173

178-
-
179-
message: "#^Method Drupal\\\\helfi_kymp_content\\\\Paikkatieto\\\\PaikkatietoClient\\:\\:fetchStreetsForLineString\\(\\) has parameter \\$coordinates with no value type specified in iterable type array\\.$#"
180-
count: 1
181-
path: public/modules/custom/helfi_kymp_content/src/Paikkatieto/PaikkatietoClient.php
182-
183-
-
184-
message: "#^Method Drupal\\\\helfi_kymp_content\\\\Paikkatieto\\\\PaikkatietoClient\\:\\:fetchStreetsForLineString\\(\\) return type has no value type specified in iterable type array\\.$#"
185-
count: 1
186-
path: public/modules/custom/helfi_kymp_content/src/Paikkatieto/PaikkatietoClient.php
187-
188-
-
189-
message: "#^Method Drupal\\\\helfi_kymp_content\\\\Paikkatieto\\\\PaikkatietoClient\\:\\:makeRequest\\(\\) has parameter \\$queryParams with no value type specified in iterable type array\\.$#"
190-
count: 1
191-
path: public/modules/custom/helfi_kymp_content/src/Paikkatieto/PaikkatietoClient.php
192-
193-
-
194-
message: "#^Method Drupal\\\\helfi_kymp_content\\\\Paikkatieto\\\\PaikkatietoClient\\:\\:makeRequest\\(\\) return type has no value type specified in iterable type array\\.$#"
195-
count: 1
196-
path: public/modules/custom/helfi_kymp_content/src/Paikkatieto/PaikkatietoClient.php
197174

198175
-
199176
message: "#^Method Drupal\\\\helfi_kymp_content\\\\Plugin\\\\Block\\\\SubdistrictsNavigationBlock\\:\\:__construct\\(\\) has parameter \\$configuration with no value type specified in iterable type array\\.$#"

public/modules/custom/helfi_kymp_content/config/schema/helfi_kymp_content.schema.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ helfi_kymp_content.settings:
2121
type: string
2222
sync_lookback_offset:
2323
type: string
24+
address_search_distance:
25+
type: integer
26+
label: 'Address search distance in meters'
27+
address_search_limit:
28+
type: integer
29+
label: 'Address search result limit'

public/modules/custom/helfi_kymp_content/helfi_kymp_content.services.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ services:
88
arguments:
99
- 'helfi_kymp_content'
1010

11-
helfi_kymp_content.search_api_subscriber:
12-
class: Drupal\helfi_kymp_content\EventSubscriber\SearchApiSubscriber
13-
arguments: ['@logger.channel.helfi_kymp_content']
14-
tags:
15-
- { name: event_subscriber }
16-
1711
Drupal\helfi_kymp_content\StreetDataService: ~
1812

1913
Drupal\helfi_kymp_content\Paikkatieto\PaikkatietoClient: ~

public/modules/custom/helfi_kymp_content/src/EventSubscriber/SearchApiSubscriber.php

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)