} 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;
| house_number | 86 |
| road | Schellingstraße |
| suburb | Eilbek |
- | neighbourhood | Auenviertel |
| postcode | 22089 |
| city | Hamburg |
| country | Deutschland |
| type | value |
| house_number | 73 |
| road | Schellingstraße |
- | neighbourhood | Auenviertel |
| suburb | Eilbek |
| postcode | 22089 |
| city | Hamburg |