Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: have 404s return nearest match #126

Open
bertday opened this issue May 1, 2017 · 4 comments
Open

Proposal: have 404s return nearest match #126

bertday opened this issue May 1, 2017 · 4 comments

Comments

@bertday
Copy link
Contributor

bertday commented May 1, 2017

A Property Search user reported that "searches are not working" when searching for this block:

http://property.phila.gov/?bn=600&bs=Archer%20St

That block doesn't seem to exist, but it makes sense that the error in Property Search ("Failed to retrieve results. Please try another search.") sounds like something's not working on the back end. Should we alter 404 errors in AIS to return the nearest match so that a more helpful message can be displayed, e.g. "Did you mean 3800 Archer St"?

/cc @Alexander-M-Waldman @tswanson

@Alexander-M-Waldman
Copy link
Contributor

Yes, @rbrtmrtn it seems that this would be helpful for users. It can be easily implemented when the nearest seg is returned by Passyunk, but currently this is limited to queries that are within 200 address numbers from a nearest seg. @tswanson how do you feel about removing the address number "distance" constraint in Passyunk to facilitate this?

@Alexander-M-Waldman
Copy link
Contributor

Actually returning the nearest match is beyond Passyunk's matching to nearest actual street segment number; this would entail finding an existing address even if the query returns a seg match but no address match. I will consider a solution @rbrtmrtn @tswanson.

@tswanson
Copy link
Contributor

@rbrtmrtn @Alexander-M-Waldman are you asking to increase the passyunk 200 address number? What should it be? 500 Without a constraint we were getting weird result

@bertday
Copy link
Contributor Author

bertday commented May 27, 2017

I see it as something that belongs more in AIS than Passyunk. My thought was to have it return the nearest match regardless of how far off it is. There will be some false positives but I think it's more important for the API to feel predictable than to always have a reasonable answer. That said, I think developers also need to know the implications of a nearest match and we should probably add something to our documentation to recommend confirming these with the end user (e.g. show a popup "Did you mean 3000 ARCHER ST?" rather than just zooming to it). But I think overall this will lead to a more positive experience in Property and other apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants