pelias / pelias/api

Full text queries vs ID based filters

Open
#1,411 0 comments 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

I was wondering why, among the queries that are parsed by libpostal and placeholder, only address layered queries uses an ID based filter, while a venue layered, or admin parts with postalcode queries does not use such a filter, and only does a full text query to ElasticSearch?

For example: Waltham Forest, London, Greater London, England, E10 5NX, Reino Unido. With your debug log the Elasticsearch query shows it skipped using placeholder IDs as filters and did a full text request rather

Ideally for this, elasticsearch could just be queried for postalcode with a filter on borough with id 1158857287

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

Trace how libpostal and placeholder results are turned into Elasticsearch queries, comparing address-layered queries with venue-layered and admin-parts-with-postalcode queries. Use the debug log example as a baseline; done means the intended ID-based filtering behavior is implemented consistently or the reason it cannot be used is documented.

Written by the indexing model from the issue text.

Assessment

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