-
-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocomplete: Multi-lang search (based on user's lang) #1296
Comments
@Joxit I haven't, I was waiting for some clarifications in the other issue and I started working on some other stuff now. So sure, go ahead and take it, thanks a ton for doing this! :) 🥂 |
It seems that in order to validate this issue, all the importers must support the multi-lang index. At this time, only OSM supports it. I think, the most important importer is WOF, the city/country search is the most common use case of the geocoder. |
@Joxit FWIW there seems to be some level of support for that already - when looking for something, passing e.g. https://pelias.github.io/compare/#/v1/autocomplete%3Flang=en&text=red%20square%20moscow I thought that data was based on WOF. |
Yes, this is done by pelias/placeholder which is a middleware and translate ElasticSearch responses for the user (using WOF ids). The data is present in WOF, but not indexed in ES, only the default name and English variant are currently indexed. That's why I opened pelias/whosonfirst#446 😄 |
Gotcha now, thanks! About that, I'm thinking we should also return |
I think the API can return the |
I was thinking about it at a higher level. Simplest seems to me to update Instead of going for |
Hi everyone! Any update on this one? LMK if I can help some way. |
Hi @mihneadb, unfortunately, it's me whos the blocker here, I would like to land #1287 before merging this (It's a complex change but I'm planning on doing the final testing and merging next week). It's really not ideal to hold back another PR, especially a community contribution, but it makes sense for us in this case because the PR I linked is a massive refactoring of how autocomplete queries are generated. We are sometimes a little over-cautious with merging big PRs but it's our responsibility to ensure compatibility and reliability for organisations running Pelias in a production environment with user-facing traffic. |
Oh actually I thought this was another PR, but the same still applies to this one ;) |
@missinglink thanks for the transparency! Looking forward to using the new parser! :) |
@missinglink Any news on this? |
I've been sick this week but releasing the new parser is a top priority. |
Hi, I came across an issue related to this today. I was looking for Edo Tokyo Museum and could not find any result. I realized that I had to search for 江戸東京博物館 in order to find it. Any ETA for this feature? |
Hi @bboure, this part of the feature is already live if you are running your query with {
"constant_score": {
"filter": {
"multi_match": {
"type": "cross_fields",
"query": "Museum",
"fields": [
"parent.country.ngram^1",
"parent.dependency.ngram^1",
"parent.macroregion.ngram^1",
"parent.region.ngram^1",
"parent.county.ngram^1",
"parent.localadmin.ngram^1",
"parent.locality.ngram^1",
"parent.borough.ngram^1",
"parent.neighbourhood.ngram^1",
"parent.locality_a.ngram^1",
"parent.region_a.ngram^1",
"parent.country_a.ngram^1",
"name.default^1.5"
],
"analyzer": "peliasQuery"
}
}
}
} In the The missing feature is multi lang in parent hierarchy now. |
@Joxit Thanks for reaching back. Add Am I doing something wrong? |
Interestingly, looking for It has to do on how the query is built Edo Tokyo Museum, Tokyo:
The full text falls into the Edo Tokyo Museum:
|
Don't worry, I'm working on a fix, I will publish something tonight or tomorrow. Yes, in autocomplete, the last token can be either a part of the subject (the venue) or the hierarchy. That's why we are using a |
Great, thanks! |
This adds a test for finding [Edo Tokyo Museum](https://pelias.github.io/compare/#/v1/autocomplete?layers=venue&debug=1&text=Edo+Tokyo+Museum) via autocomplete. Connects pelias/api#1296 (comment) Connects pelias/api#1493
This adds a test for finding [Edo Tokyo Museum](https://pelias.github.io/compare/#/v1/autocomplete?layers=venue&debug=1&text=Edo+Tokyo+Museum) via autocomplete. Connects pelias/api#1296 (comment) Connects pelias/api#1493
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 getParijs, Frankrijk
.What should we do ?
multi_match
in autocomplete queries (done in Use default index + user-lang index in autocomplete #1300)Should search inname.$LANG
index with higher boostShould search inname.default
index with standard boostShould search inname.en
index as fallback with lower boost (when$LANG
is noten
)name.$LANG
when available, default otherwise (done in Translate name to request language when available. #1301)Parijs, Frankrijk
.Some use cases
cc @mihneadb Have you started working on it ? I can take the task if you want 😄
The text was updated successfully, but these errors were encountered: