api
api copied to clipboard
address fallback queries containing a unit no
When providing a unit number, the address fallback query does not fallback to match the correct housenumber+street even when that address is available (examples below).
The error is only triggered in the case where a unit no is provided and is clear when using debug mode to inspect the elasticsearch query, this could likely be solved by adding an additional fallback step for queries containing a unit number.
/v1/search?text=15/5-7 Esplanade, Elizabeth Bay, NSW, Australia
"parsed_text": {
"number": "5-7",
"street": "esplanade",
"neighbourhood": "elizabeth bay",
"state": "nsw",
"country": "australia",
"unit": "15"
}
# returns street
/v1/search?text=5-7 Esplanade, Elizabeth Bay, NSW, Australia
"parsed_text": {
"number": "5-7",
"street": "esplanade",
"neighbourhood": "elizabeth bay",
"state": "nsw",
"country": "australia"
}
},
# returns address
Nice find. Hopefully we can build a query where the unit number is a should condition. The logic for falling back is already pretty complicated, and adding another "level" of fallback would make things even more complicated.