`disable_fuzziness: true` in `/search/location/query` (MAPCO-4782)

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the request against /search/location/query with disable_fuzziness=true, then trace how the route builds its Elasticsearch function_score query. The issue does not establish whether non-exact results should be returned, so the expected behavior must be decided before changing the query mechanism; done means the agreed behavior is implemented and verified for this request.

Written by the indexing model from the issue text.

Description

bug In Design

Describe the bug
For /search/location/query when disable_fuzziness: true it still produces response that do not match the exact query.
We need to decide expected behavior in this particular route.

To Reproduce
Steps to reproduce the behavior:

  1. run the project.
  2. send request to /search/location/query with disable_fuzziness: true and a query that won't produce exact match like airport. For example:
curl --location 'http://localhost:8080/search/location/query?query=airport%2C%20los%20angele&disable_fuzziness=true'

Expected behavior
For the example above, i'm not sure if we should produce a result.

Additional context
Currently, the query is based on ElasticSearch's function_score. If we want to really support disable_fuzziness: true, we need to rewrite the query mechanism.

Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from MapColonies/geocoding

All issues in MapColonies/geocoding

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.