Ga naar hoofdinhoud

Why Offline Search Is So Hard

· 8 minuten leestijd

If you have ever typed an address into OsmAnd and got a street in another town — or nothing at all — you are not alone. Search has been the most common complaint we hear, and in our 2026 survey it came up again and again in every language. So this year we did not patch it once more. We built a new search engine from scratch, and it comes to everyone with OsmAnd 5.5. If you don't want to wait, it is already in our nightly builds.

The video above tells the whole story in 23 minutes. Below is the short version, with a few interactive demos so you can play with the same ideas the new engine uses.

What Changes for You​

  • Addresses typed your way. Unter den Linden 10 or 10 Unter den Linden, S Mountain Blvd for South Mountain Boulevard, a postcode or a state instead of a town.
  • Typos corrected. Misspell a word and search offers the right one: leopoldstrase 10 → Leopoldstraße 10, mnuc → München.
  • Suggestions as you type. Start a word and search offers the most common words that continue it — tap one instead of typing the rest.
  • Public services by the name people use. DMV finds motor vehicle offices and NHS finds NHS clinics, even when the map lists the organisation only as the operator.
  • Categories in more words and languages. Categories match common synonyms and work in your language, in English, and in the local language: with the app in English, both school and Schule find schools in Germany.
  • Places next to places. Fuel McDonald's finds gas stations with a McDonald's nearby; Shell on a named street; two streets that cross.
  • Faster and measured. The search itself is about five times faster, and every change now runs against 137,000 real searches in 28 test sets — 99.5% of them are found.

Why Is This So Hard Offline?​

Google can afford to be clever: every query goes to a server that has learned from billions of searches, corrections, and taps. OsmAnd has no server. Everything happens on your phone, inside the map files you downloaded — so the phone itself has to work out what you meant.

And addresses have no grammar book. Every country writes them its own way, and people mix the parts in any order. The same line of text can mean two different places:

One line of text, many readings
Real queries from our tests. The colour shows what each word turns out to be.
«5 Ave New York»
5 AvestreetNew Yorktown— Fifth Avenue in New York City
or5houseAve … New Yorkstreet— house 5 on New York Avenue
«Pennsylvania Avenue, Utah»
Pennsylvania AvenuestreetUtahstate— a street named after one state, in another
orPennsylvaniastate— also a state on the other side of the country — and "Avenue" is in over a million street names
«48 Free Street, Portland, Maine»
48houseFree StreetstreetPortlandtownMainestate— the state of Maine
orMainestreet— there is also a Maine Street, 37 km away
«New Philadelphia»
New Philadelphiatown— a town in Ohio
orNewstreetPhiladelphiatown— New Street in Philadelphia
«Calle 20 301, Mérida»
Calle 20street301houseMéridatown— the first number is the street, the second the house
«Rue du 8 Mai 1945»
Rue du 8 Mai 1945street— two numbers, and neither is a house
«14-54 31st Road, Queens»
14-54house31st RoadstreetQueenstown— one house number with a dash
«Calle L entre 23 y 25, La Habana»
Calle Lstreetbetween 23 and 25streetLa Habanatown— no house number at all — just the streets around it
Same place, different text
«23 South 2nd Street, Saint Clair» = «Saint Clair, South 2nd Street 23»
«S Mountain Blvd» = «South Mountain Boulevard»
«Hemauerstraße» = «Hemauer Straße»
«Mcdonalds» = «McDonald's»

In Havana an address names the streets around the house

First, Measure​

For years every release fixed some search bugs, and every year 50 to 90 new ones came in. Users told us almost nothing works; we could not reproduce a single bug ourselves. So in 2025 we stopped guessing and built a test bench: take thousands of real addresses from the map, type each one the way a person would, and count how many are found.

The first honest number was about 80%. Every user report with a real address became another test — and the bench, not our feeling, started deciding what is fixed.

The first test bench: about four addresses in five found

The Old Way: a Librarian​

The old search worked like a librarian: find the town, walk along its shelf of streets, open the street, find the house. It works well in a small town. It works much worse when the town is London — one shelf with 56,266 streets — or when there is no town at all and a single word can be a village, a street, or a hospital. Try it:

The librarian
How the old search looked for an address. Real data from OsmAnd maps — the same scenes as in the video.
step 1 of 21
Every search starts with a key: take the rarest word, find every place that has it, and let the other words filter.

Every address that broke got its own patch: townships, word order, abbreviations. Each patch fixed one address and broke another, and together they became slow and fragile. One user with eighty maps installed waited more than two minutes for the right result.

The New Idea: Put the Words on the Map​

We are searching a map, after all. So instead of walking shelves, the new engine lights up every word of the query on the map, and looks for the places where the lights meet. A street and its town meet because their areas overlap; a McDonald's and a gas station meet because they stand next to each other. Since June 2026 every street and every town in OsmAnd maps carries its own area for exactly this.

Here are the real objects the engine finds in Portugal for one long query. Pick the words and watch the map:

Words on the map
Real objects OsmAnd found in Portugal for the query «Travessa Santo António Rua Joaquim Ribeiro Carvalho Portugal». Pick words: each one lights up the objects that have it. White dots are where all chosen words meet in one object.

The Zipper​

Comparing every object of one word with every object of another would take hundreds of millions of checks — more than half a minute for a single search. The trick is the same one every web map uses: tiles. The world is cut into four squares, each of them into four again, and so on, and every tile gets a number along a Z-shaped curve. Two tiles never overlap partially — they are either apart or one sits inside the other.

So each word becomes a sorted list of tile numbers, and two words are joined by walking both lists at once, like a zipper. Pairs that can't meet are never looked at:

The zipper
Each word becomes a sorted list of tile numbers on the Z-curve. Walk both lists at once: the smaller number steps forward, equal numbers mean a shared tile. Change the level to see how the lists grow.
×

An advanced version of the zipper jumps between tile levels — a town is a big tile, a street a small one — and skips whole regions where the other word has nothing. Half a minute became 50 milliseconds.

Tetris With Words​

Long queries, like a crossing of two streets, add one more twist. Each object covers only some of the words, so the answer is a set of pieces that covers every word exactly once — and also meets on the map. It is a classic hard problem, the same family as Sudoku. The engine plays it like Tetris: pieces dock into a row, every docking is checked on the map, and a row that drops to zero disappears together with everything that could have been built on it.

This is the engine's real trace for Travessa de Santo António, Rua Joaquim Ribeiro de Carvalho, Portugal:

Tetris with words
8 words, 8 columns. A piece is a group of objects that cover the same words; its number is how many places stand behind it. Pieces dock into a row until every word is covered — or until no places are left.
piece 0 of 30
Travessa
Santo
António
Rua
Joaquim
Ribeiro
Carvalho
Portugal
1,354 places
Portugal 1,354
A piece falls into a new row: Portugal — 1,354 places.
Next pieces
Rua Joaquim Ribeiro Carvalho
Travessa Santo António
new row: Ribeiro Portugal
Places that still meet

Where We Are Now​

The new engine went from its first test run in July 2026 to beating the old search two days later, and kept climbing. Today 99.5% of the 137,000 test searches are found. In Pennsylvania, where we started, the addresses we could not find went from 206 to 40 to 7 — and those last seven are broken in OpenStreetMap itself.

It also handles queries the old search never could, like a McDonald's next to a gas station.

Fuel McDonald’s: gas stations with a McDonald’s nearby

Not everything is solved. Havana's Calle L, between 23 and 25 has no house number, only the two streets around it, and we still can't find it. Ranking, typos, and common words each deserve a story of their own.

Try It and Help​

The new search comes with OsmAnd 5.5. You can try it today in our nightly builds, and as always the code is on GitHub. How to use search is described in the Search documentation.

  • Tell us what you typed. When search can't find something, send us the exact query to support@osmand.net or open an issue on GitHub — every miss becomes a test.
  • Help the map. A street without a name can't be found, and streets inside a town without a boundary may be missed. Add names and draw boundaries in OpenStreetMap.

The video has subtitles in 7 languages and dubbed audio in German, French, Italian, and Spanish.


We appreciate your interest in us and thank you for taking the time to read this article. Join us on social media to keep up to date with the latest news and share your experiences. Your opinion is important to us.