Skip to content

UHF-13035: Add paikkatieto street names to elasticsearch index#1279

Open
hyrsky wants to merge 3 commits intodevfrom
UHF-13035
Open

UHF-13035: Add paikkatieto street names to elasticsearch index#1279
hyrsky wants to merge 3 commits intodevfrom
UHF-13035

Conversation

@hyrsky
Copy link
Copy Markdown
Contributor

@hyrsky hyrsky commented Apr 16, 2026

UHF-13035

What was done

Added a new Search API index for street names from the Paikkatieto API into Elasticsearch for vehicle removal search autocomplete. Previously, autocomplete suggestions came from the Service Map API, which had inconsistent street name spellings compared to the Paikkatieto data used in the actual search results. Since the results query uses an exact terms match on street names, mismatches like "Tarkk'ampujankatu" vs "Tarkka-ampujankatu" made those streets unsearchable. Using the same source for both autocomplete and results guarantees the names match.

In addition, refactored PaikkatietoClient: removed distance-based closest-street filtering in favor of returning all street names within a configurable search radius. This should fix inconsistent results in intersections with the drawback of returning more "nearby" results.

How to install

  • Make sure your instance is up and running latest version of dev-branch
    • git checkout dev && git pull origin dev
    • make fresh
  • Switch to feature branch
    • git fetch && git checkout UHF-13035
  • Run code updates
    • composer require drupal/hdbt:dev-UHF-13035
    • make drush-deploy
  • In your local.settings.php, add:
$config['helfi_kymp_content.settings']['wfs_url'] = '...';
$config['helfi_kymp_content.settings']['wfs_username'] = '...';
$config['helfi_kymp_content.settings']['wfs_password'] = '...';
$config['helfi_kymp_content.settings']['address_api_key'] = '...';

See: https://helsinkisolutionoffice.atlassian.net/wiki/spaces/HEL/pages/8354005224/Tunnusten+salasanojen+ja+muiden+avainten+jakaminen.

How to test

Links to related PRs

hyrsky added 2 commits April 16, 2026 13:15
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.
@hyrsky hyrsky force-pushed the UHF-13035 branch 2 times, most recently from 045e615 to ec616d5 Compare April 16, 2026 10:38
…lete

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.
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant