Bug
When calling GET /addresses/:id the response has no geo data even though ADDRESSKIT_ENABLE_GEO=1 is set and the GNAF data is loaded correctly.
Root cause
In dist/cli.js, the address detail handler builds the response attributes from the OpenSearch document. It looks for the geocoding data under struct.geo and innerStruct.geo, but the GNAF document actually stores it under structured.geocoding.
Buggy code (~line 40620 in dist/cli.js):
...(innerStruct.geo ?? struct.geo) !== void 0 && {
geo: innerStruct.geo ?? struct.geo
GNAF document shape (confirmed via OpenSearch inspection):
{
"structured": {
"geocoding": { "latitude": -34.928, "longitude": 138.600 },
...
}
}
Fix
...(innerStruct.geocoding ?? struct.geocoding ?? innerStruct.geo ?? struct.geo) !== void 0 && {
geo: innerStruct.geocoding ?? struct.geocoding ?? innerStruct.geo ?? struct.geo
This checks geocoding first (the actual GNAF field name) then falls back to geo for forward compatibility.
Steps to reproduce
- Run AddressKit with
ADDRESSKIT_ENABLE_GEO=1 and a loaded GNAF dataset (Jan 2026)
- Call
GET /addresses/<any-gnaf-pid>
attributes.geo is absent from the response even though lat/lon exists in OpenSearch
Environment
- AddressKit v3.0.1
- GNAF Jan 2026
- OpenSearch 2.11.0
Bug
When calling
GET /addresses/:idthe response has nogeodata even thoughADDRESSKIT_ENABLE_GEO=1is set and the GNAF data is loaded correctly.Root cause
In
dist/cli.js, the address detail handler builds the response attributes from the OpenSearch document. It looks for the geocoding data understruct.geoandinnerStruct.geo, but the GNAF document actually stores it understructured.geocoding.Buggy code (~line 40620 in dist/cli.js):
GNAF document shape (confirmed via OpenSearch inspection):
{ "structured": { "geocoding": { "latitude": -34.928, "longitude": 138.600 }, ... } }Fix
This checks
geocodingfirst (the actual GNAF field name) then falls back togeofor forward compatibility.Steps to reproduce
ADDRESSKIT_ENABLE_GEO=1and a loaded GNAF dataset (Jan 2026)GET /addresses/<any-gnaf-pid>attributes.geois absent from the response even though lat/lon exists in OpenSearchEnvironment