Skip to content
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

structured: make string replacements case insensitive #1685

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

missinglink
Copy link
Member

@missinglink missinglink commented Jan 23, 2025

I noticed today that a /v1/search/structured query returned different results based on the casing of the unit number:

/v1/search/structured?address=kinkerstraat+175f

"parsed_text": [{
  "housenumber": "175f",
  "street": "kinkerstraat"
},

/v1/search/structured?address=kinkerstraat+175F

"parsed_text": [{
  "housenumber": "175f",
  "street": "kinkerstraat 175F"
},

This PR resolves the issue by converting some string replacement logic to be case-insensitive.

@missinglink missinglink changed the title feat(structured): make string replacements case insensitive structured: make string replacements case insensitive Jan 23, 2025
@missinglink
Copy link
Member Author

I pushed a rebase which uses _.escapeRegExp(), because safety.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant