<p>To explain a bit further how all this works, the system is designed so that each result has three values, a <code>prefix</code>, a <code>name</code> and a <code>suffix</code> and traditionally those were joined together in order to create a sentence which was displayed as the result, with the <code>name</code> as the link.</p>

<p>The different geocoder backends fill those in in different ways:</p>

<ul>
<li>
<code>search_latlon</code> which is a psuedo search for lat/lon pairs

<ul>
<li>
<code>prefix</code> is not used</li>
<li>
<code>name</code> is the text of the lat/lon pair</li>
<li>
<code>suffix</code> is not used</li>
</ul>
</li>
<li>
<code>search_us_postcode</code> which uses geocoder.us to search zip codes

<ul>
<li>
<code>prefix</code> is <code>town, state,</code>
</li>
<li>
<code>name</code> is the zip code</li>
<li>
<code>suffix</code> is not used</li>
</ul>
</li>
<li>
<code>search_uk_postcode</code> which uses npemap.org.uk to search UK postcodes

<ul>
<li>
<code>prefix</code> is not used</li>
<li>
<code>name</code> is the postcode</li>
<li>
<code>suffix</code> is not used</li>
</ul>
</li>
<li>
<code>search_ca_postcode</code> which used geocoder.ca to search Canadian postcodes

<ul>
<li>
<code>prefix</code> is not used</li>
<li>
<code>name</code> is the postcode</li>
<li>
<code>suffix</code> is not used</li>
</ul>
</li>
<li>
<code>search_osm_nominatim</code> which uses nomination for general searches

<ul>
<li>
<code>prefix</code> is a string from our locale files describing the object type from nominatim</li>
<li>
<code>name</code> is the name from nominatim</li>
<li>
<code>suffix</code> is not used</li>
</ul>
</li>
<li>
<code>search_geonames</code> which uses geonames.org for general searches

<ul>
<li>
<code>prefix</code> is not used</li>
<li>
<code>name</code> is the name from nominatim</li>
<li>
<code>suffix</code> is <code>, country</code>
</li>
</ul>
</li>
</ul><p>There are also a couple of reverse search variants used by the <code>Where am I?</code> functionality.</p>

<p>As you can see some of these put in punctuation in things in the expectation that they will be assembled into a sentence in a particular order and if you're going to start reordering things then you need to make appropriate changes to that.</p>

            <p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">
              —<br>
              Reply to this email directly or <a href='https://github.com/openstreetmap/openstreetmap-website/pull/150#issuecomment-12142420'>view it on GitHub</a>.
            </p>
            <img src='https://github.com/notifications/beacon/uTRSc6ihLa7Shf84BpiOpmLWAu4oQih75mggZl1E8_mAtfEDOX_rcPHM5BKfew96.gif' height='1' width='1'>