MapColonies / MapColonies/geocoding
`disable_fuzziness: true` in `/search/location/query` (MAPCO-4782)
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**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.
Contributor guide
No contributing guide indexed for this repository
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.
Assessment
- Tech stack
- elasticsearch, typescript
- Domain
- api, backend, search
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100