pelias / pelias/parser

Right single quotation mark in node name causes it to be unsearchable in autocomplete

Open
#169 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
64
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When searching via autocomplete for this place (В’ячеслава Чорновола вулиця 8), no results are returned. However, reverse geocoding does return the place.

In the autocomplete request I see that the parser disregards everything in front of the right single quotation mark(), causing the subject to be 8 ячеслава Чорновола вулиця (street: ячеслава Чорновола вулиця, housenumber: 8).

I have tested with a different place that has apostrophe instead in it's name and it works as expected:

  • searched for this place (П'ятихатки Вулиця 11)
  • autocomplete works as expected, the place is returned
  • the parser has the subject 11 П'ятихатки Вулиця (street: П'ятихатки Вулиця, housenumber: 11).
  • reverse geocode also works

Is this a parser issue or the schema is also affected? I see in this file that this character is not included.

Steps to Reproduce
Search for a place that has a right single quotation mark in it's name using autocomplete

Expected behavior
Expected the place to be returned since it exists in the database.

Environment (please complete the following information):
NA

Pastebin/Screenshots
NA

Additional context
NA

References

NA

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 by reproducing the autocomplete request for the place named with a right single quotation mark and compare its parsed subject with the working apostrophe example. Inspect the parser behavior alongside the referenced pelias/schema punctuation.js file, then verify that the corrected parsing returns the place through autocomplete.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
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.