Places as Parquet: A Prefix and Free-Text Search that Runs in the Browser

~2.5M cities · ~375 MB served on demand from Cloudflare R2 · sub-second prefix queries · zero backend

Inspired by this bucket-as-a-database post project, I wanted to see how far we can push the cloud-native method for a typical server-side function: feature search and reverse geocoding. The results exceeded my expectations.

QUERY MODE COLD WARM INFO
San Diego, CA prefix 230 ms 34 ms 25 rows · pruned phrase scan
San Diego prefix 231 ms 32 ms 25 rows · pruned phrase scan
Santa Cruz FTS contains 2,737 ms 617 ms 5 grams · 19 segments
Kensington FTS contains 1,473 ms 183 ms 8 grams · 6 segments
36.975, -122.03 (Santa Cruz) coord nearest 1,092 ms 615 ms 25 rows · 1 geo shard + coarse pre-pass (r=40)

This proof-of-concept uses the dataset 2.5 million GeoNames cities data, partitioned into a ~375MB custom .parq wrapper. The parq file is a cloud-native wrapper around parquet. It bundles several places indexes — name/prefix files for searching, gram postings for full-text contains matching, and geo coordinates for nearest-point lookup — into one file on object storage. Instead of loading whole datasets, the browser requests just the small byte ranges it needs, so queries answer over the network without ever downloading the whole archive.

Try it live: www.malcolmmeyer.com/webapps/places-parquet