pelias / pelias/api

Deduplication issue with transit stops

Open
#1,460 5 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

Hi there,

I encountered an issue concerning the dedupe strategy.
Autocomplete/search for "Manneken Pis" does not return the little peeing guy I am expecting. Instead, only the Bus stop is returned.

After some debugging, I found that they are considered duplicates:

  • they have the same layer and parent hierarchy
  • they both have the same name in some languages
  • the statue node does not have an address or postal code
  • The bus stop does have an address and postal code
    (if one element does not have an address they are considered equal)

Then, the bus stop is preferred because it has a zipcode.

This issue can possible happen many times as bus/metro/train stops often have the name of a nearby famous venue.

Suggestion:
Should we add a dedupe rule, maybe on category and/or addendum? venues with different categories should not be considered as duplicates.
Although, this could generate real duplicates since venues on osm are often duplicated and do not necessarily have the same tags.

Alternatively, another solution could also involve popularity. In this case, the statue has a higher popularity than the bus stop. But if you are actually looking for the bus stop, then this does not work either.

Any idea?

Thanks

https://pelias.github.io/compare/#/v1/autocomplete?focus.point.lat=50.843183&focus.point.lon=4.371755&text=Manneken+pis&debug=0

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 Manneken Pis autocomplete case from the linked Pelias compare URL, then read helper/diffPlaces.js around lines 166-172 and middleware/dedupe.js around line 113. Determine how transit stops and nearby venues should be distinguished, and define tests that preserve valid deduplication while returning the expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, search
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.