-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add index for all wof languages (when differents to default language) #446
Conversation
53c139a
to
a3f2849
Compare
Oooh, looking forward to this. Keep in mind I just made a PR (#444) that drastically changes the format of some tests. You'll probably have to rebase :( On the plus side there are 1000 fewer lines in that test file :) |
ha ha thx I saw that, I force push :p |
… default language) This importer did not index preferred names of all languages. We need this for the multi-lang search in autocomplete. I remove all elements when they are present in the default index. That means, if we say New York in the default language and New York in FRA, I will drop the FRA entry. This should prevent a massive increase of ES indexes.
a3f2849
to
85765c1
Compare
Updated, I added the support for label:* and variants 😄 ready for review ! |
…ad of iso3166. WOF is using iso639 in their names. That caused some fail with spanish/spain (spa vs es)
Added commit for tests and iso639. WOF is using iso639 in their names. That caused some fail with |
Cool. this looks good to me. I ran a quick import and the size of WOF data increased from 1.8GB to 2.8GB, which is well worth it! |
Hey @Joxit I just tried doing a planet import and it looks like there is a clash between WOF and this patch.
|
Hi @NickStallman, I tried a Germany import only (which contains Bahrdorf) and I didn't find any error (with the docker pelias/whosonfirst:master) 🤔 |
@Joxit @orangejulius I think this change might have introduced a small bug. Example: Madrid "name": {
"default": [
"Madrid",
"MAD"
],
"en": "MAD",
} And the API returns "MAD". "properties": {
"id": "101748283",
"gid": "whosonfirst:locality:101748283",
"layer": "locality",
"source": "whosonfirst",
"source_id": "101748283",
"name": "MAD",
"accuracy": "centroid",
"country": "Spain",
"country_gid": "whosonfirst:country:85633129",
"country_a": "ESP",
"macroregion": "Community of Madrid",
"macroregion_gid": "whosonfirst:macroregion:404227387",
"region": "Provincia de Madrid",
"region_gid": "whosonfirst:region:85682783",
"region_a": "MD",
"locality": "Madrid",
"locality_gid": "whosonfirst:locality:101748283",
"continent": "Europe",
"continent_gid": "whosonfirst:continent:102191581",
"label": "MAD, Madrid, Spain"
}, |
Hi @bboure, is your placeholder up and contains Madrid ? |
@Joxit I was indeed missing data in placeholder. It now works as expected. |
What is this for ?
This importer did not index preferred names of all languages.
We need this for the multi-lang search in autocomplete.
I remove all elements when they are present in the default index. That means, if we say
New York
in the default language andNew York
in FRA, I will drop the FRA entry. This should prevent a massive increase of ES indexes.For now, only
name:{lang}_x_preferred
is used, I need to add the support tolabel:{lang}_x_preferred
Should I Add variant too ?
related: pelias/api#1296