MapColonies / MapColonies/geocoding
`disable_fuzziness: true` in `/search/location/query` (MAPCO-4782)
Nobody has claimed this yet.
- 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:
- run the project.
- send request to
/search/location/querywithdisable_fuzziness: trueand a query that won't produce exact match likeairport. 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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