Skip to content

remove removeAllZeroNumericPrefix filter? #503

Open
@missinglink

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?

schema/settings.js

Lines 234 to 238 in 4d6d74d

"removeAllZeroNumericPrefix" :{
"type" : "pattern_replace",
"pattern" : "^(0*)",
"replacement" : ""
},

Image

Related:

cc/ @orangejulius @Joxit

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions