Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unfortunately no, 1) you can't trim the whitespace if you're matching cities, 2) matching the cities lowercase opens up too many false positives. At the same time, matching every city with its uppercase equivalent doubles the time requested to build the db but only adds a tiny handful of posts. That's why (for now) I settled with a tradeoff where I catch the uppercase equivalent for the biggest cities only.



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: