Itz-Agasta [Sun, 3 May 2026 10:08:05 +0000 (15:38 +0530)]
test: add BDD scenario for locale-aware reranking (#3871)
Add a test scenario where a place with a non-English local name
and an English name:en alias competes against a place with only
an English name. Verifies that accept-language=en correctly
Itz-Agasta [Sun, 3 May 2026 10:07:15 +0000 (15:37 +0530)]
use locale-aware names for query word matching
When reranking search results, the word matching pool was built only
from display_name, which returns the local name (e.g., "Αθήνα" for
Athens, Greece). This caused results with translated names to receive
unfair distance penalties when the caller used accept-language.
Introduce _get_result_rerank_text() which builds the reranking text
using locale-aware name resolution from locales.display_name(). This
ensures that name variants like name:en are included in the word
matching pool when the caller requests a specific language.
Add uv workspace support and pip dependency groups for development
Add root pyproject.toml with uv workspace configuration
- Add [project] section so pip can auto-install nominatim-api and nominatim-db
- Add dependency groups (runtime, test, lint, types, docs, serve) for easy setup
- Simplify development docs to use 'pip install --group dev .' instead of long package list
- Remove gunicorn from serve group (deployment only)
- Pin mypy to <=1.19.1 for compatibility with existing code
- Add *.egg-info/ to .gitignore
With these changes, developers can set up with:
- uv: uv sync
- pip: pip install --group dev .
Itz-Agasta [Tue, 24 Mar 2026 17:39:43 +0000 (23:09 +0530)]
Introduce pyproject.toml with uv workspace
Add a root pyproject.toml that defines a uv workspace over the existing
packaging/ directory and declares PEP 735 dependency groups for development
tools (test, lint, types, docs, serve).
These groups are ignored by pip and only activated when using uv, so the
existing virtualenv + pip workflow is unaffected. The 'dev' group includes
all sub-groups by default, so 'uv sync' installs everything needed for
development in one command.
Harith Hilmi [Sat, 28 Mar 2026 09:56:50 +0000 (17:56 +0800)]
Expand Malay (ms) abbreviation variants for MY, SG, BN
The existing variants-ms.yaml only had 8 entries. This expands it to
cover common abbreviations used across Malaysia, Singapore, and Brunei,
organized by country where needed.
Tested on a local Nominatim instance (Docker, mediagis/nominatim:4.4)
with Malaysia-Singapore-Brunei extract. Verified searches like
"Jln Bukit Bintang", "Lrg Petaling", "Kg Baru", "Tmn Tun Dr Ismail",
"Sg Buloh", "Bt Purmei" all resolve correctly.
AI-assisted: Claude was used to help organize and test these variants.
All abbreviations were verified against JUPEM guidelines and OSM wiki
sources, and tested on a real Nominatim installation.
Itz-Agasta [Thu, 19 Mar 2026 16:06:52 +0000 (21:36 +0530)]
Address review feedback for associatedStreet support
- Split placex query into UNION ALL for ways/relations to enable
partial index usage (idx_placex_osmid_w/r)
- Use osm2pgsql_properties table to check db_format in migration
- Remove legacy planet_osm_rels code paths now that migration exists
- Remove unnecessary Jinja conditionals around place_associated_street
- Filter node-type streets in Lua for data consistency
- Align test table columns
Itz-Agasta [Fri, 13 Mar 2026 12:04:58 +0000 (17:34 +0530)]
Adds tests and support for updating associatedStreet relations
Improves handling of house-parenting when associatedStreet relations
are added, updated, or removed. Mirrors relation data in a dedicated
table and simulates relation updates to ensure correct parent assignment
in downstream logic. and Update import tests with explicit role handling
Itz-Agasta [Fri, 13 Mar 2026 12:02:16 +0000 (17:32 +0530)]
Adds migration for associatedStreet relation support
Introduces a new database table to store associatedStreet relations,
enabling better handling of place-street associations. Handles both
current and legacy database formats, warning when a full reimport
is needed for older schemas. Updates version to track schema change.
Itz-Agasta [Fri, 13 Mar 2026 12:01:51 +0000 (17:31 +0530)]
Switches associatedStreet handling to dedicated table
Improves address relation processing by migrating logic to a new dedicated table for associatedStreet relations.
Simplifies triggers and indexing, ensuring precise updates and more efficient parent assignment for house members.
Updates tests and freeze tooling for compatibility.