MapColonies / MapColonies/geocoding
`disable_fuzziness: true` in `/search/location/query` (MAPCO-4782)
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
描述
**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.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用 `disable_fuzziness=true` 重现对 `/search/location/query` 的请求,然后跟踪该路由如何构建其 Elasticsearch `function_score` 查询。该 issue 没有确定是否应返回非精确结果,因此必须先决定预期行为,再更改查询机制;对于此请求,实现并验证约定的行为后,才算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- elasticsearch, typescript
- 领域
- api, backend, search
- Issue 类型
- 缺陷
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100