X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/eeb26aaa6fb4010fcbe34decbf3efc8c42995d1c..e552f6bce557df08ef7305369664fd70dd3aed96:/lib/SearchDescription.php diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index 4fafbec2..33b766a5 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -657,13 +657,10 @@ class SearchDescription } if ($this->sHouseNumber) { - $aTerms[] = 'address_rank between 16 and 27'; + $aTerms[] = 'address_rank between 16 and 30'; } elseif (!$this->sClass || $this->iOperator == Operator::NAME) { if ($iMinAddressRank > 0) { - $aTerms[] = 'address_rank >= '.$iMinAddressRank; - } - if ($iMaxAddressRank < 30) { - $aTerms[] = 'address_rank <= '.$iMaxAddressRank; + $aTerms[] = "((address_rank between $iMinAddressRank and $iMaxAddressRank) or (search_rank between $iMinAddressRank and $iMaxAddressRank))"; } }