Description
Today I was investigating an issue where leading zeros in postcodes don't sort as expected.
After investigating some approaches to add additional should
conditions, it occurred to me that maybe we can just get rid of this removeAllZeroNumericPrefix
filter completely?
I honestly don't recall why we have that in the first place, it dates back over ten years to a huge refactor I did to move from an FST based index to an Edge N-Gram Index, the PR doesn't mention this functionality specifically.
@orangejulius also commented at some point he doesn't fully recall either.
Given the issues it causes to some postal codes and potentially venue names, would it be preferable to remove it as there are relatively few cases of leading zero housenumbers?
I'm possibly missing something, does anyone remember why, or can come up with some good reasons why we have that?
Lines 234 to 238 in 4d6d74d

Related:
- autocomplete does not return postal codes lower than 10000 pelias#898
- Add filter to remove leading zeros to
peliasPhrase
analyzer #475
cc/ @orangejulius @Joxit
Activity