pelias / pelias/api

address fallback queries containing a unit no

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

Nobody has claimed this yet.

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

Description

When providing a unit number, the address fallback query does not fallback to match the correct housenumber+street even when that address is available (examples below).

The error is only triggered in the case where a unit no is provided and is clear when using debug mode to inspect the elasticsearch query, this could likely be solved by adding an additional fallback step for queries containing a unit number.

/v1/search?text=15/5-7 Esplanade, Elizabeth Bay, NSW, Australia

      "parsed_text": {
        "number": "5-7",
        "street": "esplanade",
        "neighbourhood": "elizabeth bay",
        "state": "nsw",
        "country": "australia",
        "unit": "15"
      }

# returns street
/v1/search?text=5-7 Esplanade, Elizabeth Bay, NSW, Australia

      "parsed_text": {
        "number": "5-7",
        "street": "esplanade",
        "neighbourhood": "elizabeth bay",
        "state": "nsw",
        "country": "australia"
      }
    },

# returns address

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 with the /v1/search endpoint and reproduce the two example queries in debug mode. Compare the Elasticsearch queries for the unit-number and housenumber+street cases, then verify that the unit-number query falls back to the correct address when it is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, javascript
Domain
api, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.