X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/47714357cb800c69d006b3a868356bf80d09549a..6a4192d3d18e9db2dce7d8f9f1b229d5ae9f7c6f:/lib/SearchDescription.php diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index 4fafbec2..bb478b29 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -660,10 +660,7 @@ class SearchDescription $aTerms[] = 'address_rank between 16 and 27'; } 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))"; } }