]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/SearchDescription.php
allow sorting by housenumbers for rare street names
[nominatim.git] / lib-php / SearchDescription.php
index 228b099917d6377f102a2987bf9e6f76af68058b..2b39443f6e79f1b86b1571520ac0c1d4369cf6bc 100644 (file)
@@ -614,7 +614,7 @@ class SearchDescription
         // too many results are expected for the street, i.e. if the result
         // will be narrowed down by an address. Remeber that with ordering
         // every single result has to be checked.
-        if ($this->sHouseNumber && (!empty($this->aAddress) || $this->sPostcode)) {
+        if ($this->sHouseNumber && ($this->bRareName || !empty($this->aAddress) || $this->sPostcode)) {
             $sHouseNumberRegex = '\\\\m'.$this->sHouseNumber.'\\\\M';
             $aOrder[] = ' (';
             $aOrder[0] .= 'EXISTS(';