A bloke in the pub searched for Portland this week, from a phone in England. He typed "Portland OR", and he got Oregon, which is what he wanted. Then the site did what it does with every search: it remembered it. It remembered the word Portland. His next search came back from that memory, and it came back with Portland in Dorset, population 12,710, and a page of hotels in Weymouth. He wanted the one with 632,309 people, and he had said so the first time. He said they all do that. He is probably right. Challenge accepted. I had, by then, fixed place names on this site twice. I thought it was covered.
This is a note about why one word is so hard to answer, why every fix I made was right and still wrong, and what a traveller can do about it. I build the site, so the mistakes are mine, and the numbers are from the data I actually use.
How many Newcastles?
The place names come from GeoNames, the open geographic database most travel software leans on. Ask it for Newcastle and it returns ten. The four that matter:
- Newcastle, KwaZulu-Natal, South Africa: 404,838 people.
- Newcastle, New South Wales, Australia: 308,308.
- Newcastle upon Tyne, England: 192,382.
- Newcastle-under-Lyme, England: 75,794.
Richmond returns 25 places. Washington returns 18. Portland returns 12. Perth is two that count: Western Australia at 1.9 million and the Scottish one at 47,180. Christchurch is New Zealand at 363,926 against Dorset at 42,396.
None of those is the wrong Newcastle. They are all Newcastle. Britain spent three centuries naming the world after itself, and the world kept the names: Portland, Oregon, is named after Portland, Maine, on a coin toss in 1845, and Portland, Maine, is named after the Isle of Portland in Dorset. Perth, Richmond, Windsor, Christchurch and Washington all went the same way. Germany does it to itself, with Frankfurt am Main and Frankfurt an der Oder and more Neustadts than anyone can count. The word carries no identity at all, and a booking site has to turn it into one place before it can show a single price.
Four ways to be right, and wrong
There are four honest ways a system can answer the word, and I have used every one of them.
- The biggest wins. Simple, and often right. It sends everyone typing Perth to Western Australia, including someone in Dundee who wants a weekend up the road.
- Your own country wins. Also often right. It sends a man in an English pub to Dorset, and it sends anyone in Ontario typing Windsor to the wrong Windsor for a Legoland trip.
- The place with the hotels wins. Where a site actually lists rooms is a better guide to "destination" than population. Salamanca in Guanajuato, Mexico, has 160,000 people and Salamanca in Spain has 144,000. I list 91 hotels in one and two in the other. Population picked Mexico for everyone. It was wrong for everyone.
- A hand-drawn area wins. I keep a list of travel areas, drawn around real journeys rather than distance, so a search for Surbiton does not fill up with Heathrow. That list also decided that Newcastle meant Tyneside.
The mistake I kept making was letting different parts of the site use different rules. When I checked properly, the word Newcastle got three different answers depending on which part of the system was asked: population said South Africa, the hotel count said Australia, and the hand-drawn area said Tyneside, but only for a British visitor. Each rule was defensible. Together they were a coin toss.
What I changed
My view, having been through it three times now, is that the rules matter less than the order, and the order matters less than one thing: a place is an identity, not a word.
- Your country is a hint, not a fence. People looking for hotels are very often looking abroad. So the local namesake wins unless the one abroad is ten times bigger. Rochester still means Kent if you are in Kent, because New York is only eight times the size. Perth means Western Australia even from Edinburgh.
- Where the hotels are beats how big the town is. If I list ninety rooms in one Salamanca and two in the other, the search goes to the ninety, whoever is asking.
- The hand-drawn area gives way when the rule above has already had the argument. Christchurch used to mean Bournemouth for every British visitor. New Zealand has 189 listed hotels to Dorset's nine. New Zealand it is, and a line on the page says so.
- Long names hide places. The Tyneside hotels were filed under Newcastle upon Tyne, and nobody types that. In my own catalogue, 35 short names of that kind were hiding 415 hotels. Now the short form is a name in its own right.
- Most of all, the site now remembers the place, not the word. When you pick a place, or type it with its region, that exact place travels with the search, the shareable link, your history, your recent searches and the "search again" button, instead of being re-guessed from the word at every step. That is the bug the man in the pub hit, and it is fixed. The rest was patches.
Where I got it wrong before
In June, Windsor was Ontario because Ontario is bigger. In September, Washington was Tyne and Wear because a British visitor was assumed to want Britain. Then Portland was Oregon on the first search and Dorset on the second, because the site had kept the word and thrown away the place, and a bloke in the pub told me. Each fix was correct for the case in front of me. None of them fixed the thing underneath, which was that the site remembered a word and threw away the place.
I am not claiming this is now solved for good. Programming, learning and building is a forever project, and I have stopped expecting it to end. What I can say is that each challenge improves every time: this one is now solved in one place, with one set of rules, and when the next Newcastle turns up I will fix it once.
What a traveller should do
- Read the line under the results. It now says which place you are looking at, in full, and offers the others by name: "Showing Portland, Oregon. Did you mean Portland, England?"
- When the search box offers a place with its region attached, pick it. That choice carries the exact place, and it will not be second-guessed later.
- If the prices look absurd for the city you meant, you are probably in the other one. A page of Weymouth guest houses under the word Portland was the clue he had.
- Type the region if you know it. "Portland, Oregon" and "Newcastle, Australia" are understood, and so is "Newcastle upon Tyne" if you happen to be the one person who types it.