REST Geocoding Service, Find Address Candidate using fewest Characters

505
2
09-22-2023 05:34 AM
Labels (1)
AllanLambert
New Contributor III

I'm probably being greedy but I want my REST geocoding service to return a result if I type 5-6 characters.  If the full address is 96 Semple Farm Rd or 22 Lincoln St and I type "96 Sem" or "22 lin" I should get something besides "None".  I've turned the Match and Candidate scores down to 40 then 20 and now to 10. Nothing changes.  https://webgis2.hampton.gov/server/rest/services/Web/ProPointAddr12/GeocodeServer  I'm using Pro 3.1.3 to create a Multirole Locator using Address points and Centerline.  Then I save as "Offline Service Definition". Then in ArcGIS Server Manager 10.7.1, I publish the service using the .sd.  In Pro I can specify my locator to use (not the geocoding service) using the Locate binocular tool on the Map tab.  It successfully suggests the correct address using only 96 Semp and 22 lin .  Why won't the Rest service behave the same if it's based on the same Locator?  Thank you!!!  Allan

AllanLambert_0-1695385742084.png

 

0 Kudos
2 Replies
BradNiemand
Esri Regular Contributor

Thanks for posting this question.  You should be using the suggest API to get partial suggestions for input, not the findAddressCandidates API.  Once you get the suggestion you want you would pass the suggest text, magicKey, and all parameters that you passed to the findAddressCandidates API to get the full result.

 

Suggest API for World Geocoding Service (it will be similar to what you are doing but the software is much newer than 10.7.1 for the online service): https://developers.arcgis.com/rest/geocode/api-reference/geocoding-suggest.htm

 

FindAddressCandidates:  https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm

 

You will find some code samples in there that should give you everything you need but let me know if you have any additional questions.

0 Kudos
AllanLambert
New Contributor III

Thank you Brad.  I forwarded this to our vendor who was telling us WE were missing something in our locator.  Vendors.....

0 Kudos