fix(geocode): keep a leading "the" in keyless name matching

foldPlaceName drops a leading "the", so "The Hague" over upstate New
York accepted Hague, NY as an exact nearby match. Split the script-aware
fold into foldPlaceText and use it for keyless toponyms; foldPlaceName
keeps its behaviour for the packs and street matchers.

Also: changelog fragment credits #1585, folding test pins the Latin
letters NFD does not decompose (ß, ø, ł), and CURRENT-STATE notes that
non-Latin names match only when spelled with their marks.
This commit is contained in:
Said Turksever committed 2026-11-05 17:13:00 +00:00
1 parent e4fda9d4e6
commit bc65c274da
5 files changed
+48 -14

No files matched your search

+3 -2
View File
@@ -5721,8 +5721,9 @@ deadline, with Photon requests capped at six seconds each. Caller/application
cancellation stops retries and late cache writes. Replacing a location search
cancels the previous lookup; disposing its controls cancels the active lookup. Photon uses a soft proximity bias, up to five
candidates, and an unbiased retry for name mismatches. Name comparison folds
Latin accents while preserving letters and marks in other scripts, so an exact
non-Latin name keeps its proximity ranking. A "place, region" query prefers a
Latin accents while preserving letters and marks in other scripts, so a
non-Latin name spelled exactly, marks included, keeps its proximity ranking. A
leading "the" counts: "The Hague" does not take a nearby "Hague". A "place, region" query prefers a
candidate named exactly for the place whose city, county, state,
country or country code (or USA/UK) contains every word of the region, and a
settlement or administrative area over a POI when both fit. Nearby results that