Autocomplete: Multi-lang search (based on user's lang)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 259
- Forks
- 168
- Avg merge
- 6h 15m
- Merged PRs (30d)
- 1
Description
Transcription of https://github.com/pelias/api/issues/127#issuecomment-490002821
What is this for ?
We want Pelias to send responses to queries written in other languages than English.
For example, a Dutch looking for Parijs (Paris in Dutch) will get Parijs, Frankrijk.
What should we do ?
- Use
multi_matchin autocomplete queries (done in #1300) -
Should search inname.$LANGindex with higher boost -
Should search inname.defaultindex with standard boost -
Should search inname.enindex as fallback with lower boost (when$LANGis noten) - Should return
name.$LANGwhen available, default otherwise (done in #1301) - Found something for matching parent e.g
Parijs, Frankrijk.
Some use cases
| Text | Lang | Result | Status |
|---|---|---|---|
| Parijs | nl | Parijs, Frankrijk (whosonfirst:locality:101751119 Paris) | KO |
| Londre | fr | Londres, Angleterre, Royaume-Uni (whosonfirst:locality:101750367 London) | KO |
| ブラジル | ja | ブラジル (whosonfirst:country:85633009 Brazil) | OK |
cc @mihneadb Have you started working on it ? I can take the task if you want 😄
Contributor guide
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 from the autocomplete query and response handling in the Pelias API, then reproduce the listed Parijs and Londre cases using the language values shown. The completed checklist items are already covered by #1300 and #1301; done means resolving the remaining parent-matching case with the expected localized result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100