Skip to content

Conversation

@missinglink
Copy link
Member

@missinglink missinglink commented Dec 2, 2025

This PR adds macrocountry as an alias for locality when using address_search_using_ids queries (ie. search with placeholder).

The major benefit of this change is that queries in Australia which include a token such "Sydney" will be expanded to include results from the Greater Sydney Area rather than only Sydney Central.

For example, 300 Burns Bay Road, Sydney, AU

520126322-f19e0c06-f3d1-4549-b3c0-794547cdba6a

This will additionally improve all other Australian cities and will affect any other countries using macrocounty, which at time of writing includes France, UK, Taiwan & French Guiana:

Screenshot 2025-12-02 at 09 48 28

This will now allow the address_search_using_ids queries to match for the larger macrocounty area instead of the smaller locality layer, this should be fine in all other cases, most notably it might potentially expand a little far in France, let's keep an eye on this, for example the token "Lyon" which previously only matched the smaller area, now matches the wider area, although this includes the airport...

520148267-bf819746-9ec0-4733-b1c1-53c2a029068c

Finally worth noting the original work, as mentioned in the code comments in this file are designed to prevent the inverse from happening in the USA, this functionality has been maintained:

520129592-582f6698-798e-46dc-b6c6-91d10baf4f82

@missinglink missinglink merged commit d4dfb48 into master Dec 2, 2025
6 checks passed
@missinglink missinglink deleted the search-by-id-macrocountry branch December 2, 2025 12:33
missinglink added a commit to pelias/acceptance-tests that referenced this pull request Dec 2, 2025
missinglink added a commit to pelias/acceptance-tests that referenced this pull request Dec 2, 2025
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.

2 participants