Suggest API ignores exact address match if location is too far away

474
3
Jump to solution
08-30-2021 12:10 PM
DanielDormont
New Contributor III

Hi, in my application I am exposing an autocomplete box that uses the Suggest API to, well, make suggestions. To improve accuracy, I am passing the "location" parameter based on the user's current location or the bounds of the map they may be looking at, at the moment. I'm having some trouble in the situation where the term they're  entering, no matter how precise, is not near that location. For example, take this address:

4 Newburgh St, Carnaby, London, UK 
 
If I search that location alone: https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest?f=json&text=4+Newburgh+S... the correct address appears as the first result. But if I call it with a location: https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest?f=json&text=4+Newburgh+S... then the results don't even contain the correct address.
 
Is there a better way of using auto-suggest that handles potentially worldwide locations?
 
Thanks,Dan
0 Kudos
1 Solution

Accepted Solutions
DanielDormont
New Contributor III

Well, I think I figured it out eventually. The issue really seems to be that that in the geocoder's database, this particular location is not connected to any place called "Carnaby". 

https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=json&api...

I'm not sure where my user got this search string from, perhaps Google or another provider, but I guess it's not that surprising that the result doesn't show up.

View solution in original post

0 Kudos
3 Replies
DanielDormont
New Contributor III

Thinking about this more, this seems like a bug in the Suggest API to me. If the address I submit is an exact match for a particular real world location, that should appear first in the results even if it's far away from the location that I pass in the location parameter. Hoping this gets some visibility from the Esri API team.

0 Kudos
DanielDormont
New Contributor III

Another curious thing is that I get a slightly different set of results using geocode-api.arcgis.com instead of geococde.arcgis.com, but the actual address I'm looking for is still not there.

0 Kudos
DanielDormont
New Contributor III

Well, I think I figured it out eventually. The issue really seems to be that that in the geocoder's database, this particular location is not connected to any place called "Carnaby". 

https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=json&api...

I'm not sure where my user got this search string from, perhaps Google or another provider, but I guess it's not that surprising that the result doesn't show up.

0 Kudos