pelias / pelias/api

autocomplete not returning the correct postalcode

Open
#1,589 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
259
Forks
168
Avg merge
6h 15m
Merged PRs (30d)
1

Description

Describe the bug

I've found a strange behaviour when searching for a postal code "AB10 1ST"

Steps to Reproduce

https://pelias.github.io/compare/#/v1/autocomplete?layers=postalcode&focus.point.lat=54.753161&focus.point.lon=-2.554325&text=AB10+1ST

with the query above several results are returned but not the correct ("AB10 1ST"):
AB10 1GS
AB10 1WS
AB10 1ZX
AB10 1ZG
...

The expected result is found if a comma is added to the end "AB10 1ST,"

https://pelias.github.io/compare/#/v1/autocomplete?layers=postalcode&focus.point.lat=54.753161&focus.point.lon=-2.554325&text=AB10+1ST%2C

Additional information

parsers return the data for both inputs:
"parsed_text": {
"subject": "AB10 1ST"
},

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two autocomplete requests in the Pelias compare link, using “AB10 1ST” and “AB10 1ST,” and compare their results. Start by tracing the postalcode autocomplete path from the request and the reported parsed_text output; done means the unpunctuated query returns the correct “AB10 1ST” result, with regression coverage for both inputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.