agrc / masquerade

Disguise UGRC's Web API endpoints as an Esri locator service.
https://github.com/agrc/masquerade#readme
MIT License
1 stars 0 forks source link

Don't return candidates if there is no match #202

Open stdavis opened 2 weeks ago

stdavis commented 2 weeks ago

Currently, masquerade will return the match address or if that it not defined, then it will return the first candidate as the match. For findAddressCandidates it will return candidates whether a match is defined or not. The problem with this is sometimes, the candidates are bad matches only suitable for the suggest endpoint. For example, they may have high match scores but are located in a different address grid.

suggest

This should probably continue to suggest address point addresses and not hit the web API at all.

findCandidates

This should not return any candidates unless there is a match defined. Even then, perhaps it should filter out candidates that have a mismatched address grid? Or maybe an enhancement to the web API would be to artificially lower match scores if the address grid does not match.

geocodeAddresses

This should only return the match address or nothing.