pelias / pelias/api

Address search using IDs fails when county name is similar to a locality name

Open
#1,459 2 comments 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

This specific test-case came in via email today:

3681 Jackson Run Rd, Warren, PA 16365

We fail to return the correct result for the input above but it works correctly when including 'County' in the query as below:

3681 Jackson Run Rd, Warren County, PA 16365

It seems as though placeholder is returning the correct ID 102081337 but the logic described in the comments of https://github.com/pelias/api/blob/master/query/address_search_using_ids.js seems to be preventing it from being included:

From experience, when there's
ambiguity between locality and county for an input, the user is, with complete
metaphysical certitude, referring to the city. If they were referring to the
county, they would have entered 'York County, PA'.

@orangejulius what do you think, do you think we can fix this class of error?

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

Start in address_search_using_ids.js and reproduce the two Warren, PA queries using the provided address. Read the comments around locality and county ambiguity, then trace why ID 102081337 is excluded. Done means the issue's expected behavior is decided and the address without “County” returns the correct result, with regression coverage for this case.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.