Skip to content

Autocomplete should prioritize exact matches #1295

Description

@mihneadb

In Bucharest, Romania, there are several universities. Most are called "University of Bucharest", but one is simply "University of Bucharest", and there is also a metro station simply called "University" there.

Performing a search query for "University" ("Universitate" in Romanian) yields the expected result.
https://pelias.github.io/compare/#/v1/search%3Ffocus.point.lat=44.4378&focus.point.lon=26.0245&text=universitate

Performing an autocomplete query with the same params yields different results.
https://pelias.github.io/compare/#/v1/autocomplete%3Ffocus.point.lat=44.4378&focus.point.lon=26.0245&text=universitate

It looks like autocomplete prefers to match a prefix but somehow does not score more on exact matches. I would argue that autocomplete should prefer an exact result when available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions