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

Search doesn't return correct number of results #1198

Open
BenEquate opened this issue Jun 26, 2024 · 2 comments
Open

Search doesn't return correct number of results #1198

BenEquate opened this issue Jun 26, 2024 · 2 comments

Comments

@BenEquate
Copy link

BenEquate commented Jun 26, 2024

In reference to searching "Loughborough"

https://api.postcodes.io/places?q=lough - Only shows a keyword match, and not a search for "Contains" - No results for loughborough
https://api.postcodes.io/places?q=loughb - This is when the loughborough result returns.

The issue here is that Loughborough should return in both of these instances.

Not sure if there are other searches that act like this - haven't checked!

@cressie176
Copy link

What about extending the API

https://api.postcodes.io/places?prefix=lough

@cblanc
Copy link
Member

cblanc commented Oct 17, 2024

Thanks for creating the PR @BenEquate - sorry I've been late to this

@cressie176 has a valid concern. I haven't looked into this too closely but would be good to find a solution that doesn't require compiling a regex from user input

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

No branches or pull requests

3 participants