Why does QAS Pro API return a picklist instead of a single exact match?

Document type: Tech doc  
Associated product(s): Product name: Pro Version: 1.0 - 3.x Implementation: API
Views: 770  |  Created: 4 years agoLast updated: 4 years ago
Countries:  United Kingdom 

<< More documents like this

How do I create a picklist of addresses and get QAS Pro API to return an exact match automatically?

Summary

Any search performed with QAS Pro API will return at least one item in which you will have to step into. This means that even in the cases where only one address can be matched for the search performed, the library will return a list of items. In these cases one the items will contain a single address and the end user will have to step into it. This step could be avoided.

Solution

Using the Primary API function calls, the application can return these addresses directly, by automatically stepping into the corresponding item. The application will be set to auto-step when the item with the highest quality-matching rate contains a single address.

To implement the product this way, the original list of items returned after performing a search should be ordered by quality. This can be done by calling the function QAPro_Select. Once the list is ordered it will have to be checked whether the first item of the list contains a single address and it is not a range of premises. Some parameters returned when calling QAPro_GetItemInfo contain this information. The names of these parameters are qapro_STEPINFO and qapro_RANGEINFO. To return qapro_STEPINFO, the value passed in the second parameter, when calling QAPro_GetItemInfo, viInfo , has to be 0, and for qapro_RANGEINFO viInfo has to be 2. QAPro_Select can also be used to filter by quality the list of items returned on a search. For example you could use this function to filter the items that have a match rate quality higher than 50%.

In addition to that, the quality of a match can also be considered to decide whether to return the single address retrieved as the best match or to show the different items to the end user. For example if the item with highest quality rate retrieved after a search has a quality rate of 100% the address can be returned straight away without showing the list of items. The function QAPro_GetItemInfo can also be used to return the quality range information. In this case, when calling the function the second parameter will have to be 4. The value returned will be a number between 0 and 100.

The developer implementing the application will decide whether to treat the same way percentages lower than 100. QAS Plug & Go capture products do not do any checking on the quality if there is only 1 match. In any case, where the best match is a single address but the percentage is not 100%, it means that it is not an exact match and a warning message is showed to the end user. There is a setting that can help to restrict the number of items returned from a search, the setting MaxPremsForClones=. This can be used to determine whether or not the Streets/Premises picklist should show clone items. A clone item is a duplicate entry for a premise. The default setting is 0, which means that clone items are show. Set MaxPremsClones to 1 if you don’t want clone premises it be shown.

Pseudo-code

search QAS database [QAPro_Search]

sort results of search in match percentage order [QAPro_Select]

if picklist string for the first item is a single premise that cannot be stepped into [QaPro_GetItemInfo]

get the address from the first item [QAPro_FormatAddr]

else

get count results [QAPro_Count]

for 0 to (count-1)

….

Was this document helpful?

What can we do to improve this information?