Skip to content

Stop traffic search matching inside words - #15

Merged
galjos merged 1 commit into
mainfrom
fix/traffic-search-word-boundary
Sep 4, 2026
Merged

Stop traffic search matching inside words#15
galjos merged 1 commit into
mainfrom
fix/traffic-search-word-boundary

Conversation

@galjos

@galjos galjos commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Require word-boundary prefix matches for alphabetic traffic search terms so place names like auer no longer hit Stützmauern.
  • Keep cycle-alias prefixes and SS12 / SS 12 road-number spelling working.
  • Closes traffic search matches inside words #12.

Test plan

  • go test ./internal/commands/ -run TrafficSearch
  • Spot-check: odh traffic search auer --today --source content does not return Stützmauern notices
  • Spot-check: odh traffic search radweg --source content still finds cycle notices; ss12 still finds SS 12

Place queries like "auer" were matching "Stützmauern" via substring.
Require a word-boundary prefix so municipalities match as words while
cycle aliases and SS12/SS 12 spelling keep working. Refs #12.
@galjos
galjos force-pushed the fix/traffic-search-word-boundary branch 2 times, most recently from 023295b to 01c3e66 Compare September 4, 2026 08:14
@galjos
galjos merged commit 0fb00c4 into main Sep 4, 2026
2 checks passed
@galjos
galjos deleted the fix/traffic-search-word-boundary branch September 4, 2026 08:29
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.

traffic search matches inside words

1 participant