X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/cac8a8df18b3a80be7983e90935667f96a9fcff7..7d2b6879c87fea1739b85d3a6b232402de45a718:/lib/SearchDescription.php diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index 33b766a5..ad404528 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -199,15 +199,10 @@ class SearchDescription } elseif (($sPhraseType == '' || $sPhraseType == 'postalcode') && is_a($oSearchTerm, '\Nominatim\Token\Postcode') ) { - // We need to try the case where the postal code is the primary element - // (i.e. no way to tell if it is (postalcode, city) OR (city, postalcode) - // so try both. if (!$this->sPostcode) { // If we have structured search or this is the first term, // make the postcode the primary search element. - if ($this->iOperator == Operator::NONE - && ($sPhraseType == 'postalcode' || $bFirstToken) - ) { + if ($this->iOperator == Operator::NONE && $bFirstToken) { $oSearch = clone $this; $oSearch->iSearchRank++; $oSearch->iOperator = Operator::POSTCODE;