We have a corporate geocode service that it accessed across a number of portals and all are having issues when uploading a CSV.
Some records in CSV are not being matched due to either that the address does not exist or data issues. For example 1 Johnston St, WINDSOR does not exist in data. 1 W Portland Rd, SACKVILLE Should be 1 WEST Portland Rd
There seems to be a mismatch in the way that Portal is undertaking the suggestions.
The URL for the following search is as follows
If I use the review process when loading the CSV the URL is as following
This case returns a 400 error.
Not sure why the find address tool is using the 'suggest' option but the review is using the 'findAddressCandidate'
Any help would be very much appreciated.
Regards
Dean
Hi Dean, in order to make use of a suggest result in a findAddressCandidates request, you will need to pass one extra parameter (magicKey). When I grab the magicKey from your suggest result and add it into your findAddressCandidates request, I get the following:
You can think of a findAddressCandidates request as accepting either a text string or a suggest result object (the object containing both a text string attribute and a magicKey attribute, which helps our engine find the exact suggestion you're looking for). Please let me know if this helps or if you have additional questions. -Christa
Thanks @ChristaHash , how is the 'MagicKey' generated?
Hi Dean, the magicKey is generated as part of the output of the suggest request, and is basically just a key we generate to link a suggestion to a record in the data used to build the locator:
dojo_request_script_callbacks.dojo_request_script70(
{"suggestions":[
{"text":"1 WEST PORTLAND RD, SACKVILLE NSW 2756","magicKey":"GANSW705879336","isCollection":false
},
{"text":"34 WEST PORTLAND RD, SACKVILLE NSW 2756","magicKey":"GANSW706501063","isCollection":false
},
{"text":"74 WEST PORTLAND RD, SACKVILLE NSW 2756","magicKey":"GANSW706501060","isCollection":false
},
{"text":"93 WEST PORTLAND RD, SACKVILLE NSW 2756","magicKey":"GANSW705892850","isCollection":false
},
{"text":"96 WEST PORTLAND RD, SACKVILLE NSW 2756","magicKey":"GANSW706524225","isCollection":false
}]
});
So when if you generate suggestions and choose one to use for search (findAddressCandidates), you can pull the magicKey and matching input text from the suggestion you choose.