question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suburbs (City) not correct in Australia

See original GitHub issue

When searching for an address, the city is not being set to the suburb, it’s being set to the name of the capital city.

An example:

1 Old Perth road

Returns the following, when the city should actually be Bassendean which is the suburb:

{
  "query": "1 old perth road",
  "suggestion": {
    "name": "1 Old Perth Road",
    "administrative": "Western Australia",
    "city": "Perth",
    "country": "Australia",
    "countryCode": "au",
    "type": "address",
    "latlng": {
      "lat": -31.9046,
      "lng": 115.95
    },
    "postcode": "6104",
    "highlight": {
      "name": "<em>1</em> <em>Old</em> <em>Perth</em> <em>Road</em>",
      "city": "<em>Perth</em>",
      "administrative": "Western Australia",
      "country": "Australia"
    },
    "value": "1 Old Perth Road, Perth, Western Australia, Australia"
  }
}

Without accurate suburbs being captured into the city field this product could not be used in a business context within Australia. I have tested this for multiple locations with the same results.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
corradofiorecommented, Apr 11, 2019

It looks like the ‘suburb’ field is not present anymore, which makes things much worse as it is a fundamental element of an Australian address. Could someone from the Algolia staff look into this?

Thank you.

1reaction
corradofiorecommented, Mar 17, 2019

The output is almost correct now. I’d like to point out the two issues that still affect Aussie addresses. Let’s take the following real-world example:

{
    "city": "Perth",
    "name": "512 Hay Street",
    "type": "address",
    "value": "512 Hay Street, Perth, Western Australia, Australia",  // WRONG
    "latlng": {"lat": -31.9574, "lng": 115.869},
    "suburb": "Subiaco",
    "country": "Australia",
    "postcode": "6008",
    "countryCode": "au",
    "administrative": "Western Australia"}
  1. "value" should return "512 Hay Street, Subiaco WA 6008, Australia" instead. In fact, Australian addresses never include the capital city.

  2. We do not write the full name of the state, only its abbreviated form (ACT, NSW, WA, VIC, etc.)

Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In Australia, are different suburbs of a city considered ... - Quora
Suburbs within a city if you are in the cities metropolitan area or city limits. Outside of that it can be suburbs, areas...
Read more >
Suburbs and localities (Australia) - Wikipedia
Suburbs and localities are the names of geographic subdivisions in Australia, used mainly for address purposes. The term locality is used in rural...
Read more >
Why outer suburbs lack inner city's 'third places'
Gentrifying inner-city suburbs – places like West End in Brisbane, Fitzroy in Melbourne and Newtown in Sydney – are characterised by independent ...
Read more >
3 “Suburb Is Not a Rude Word in Australia”: A Lexical History
In most Australian capital cities (Brisbane is the exception), the suburb has also often been a municipality in its own right, with its...
Read more >
Australian Cities in the 21st Century: Suburbs and Beyond
Greater Sydney is currently predicted to be the first Australian city to ... However, the suburban nature of Australia's major settlements has not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found