]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/SearchDescription.php
fix phpcs issues
[nominatim.git] / lib / SearchDescription.php
index 4fafbec2b21c9899fb1e35c51ac8241647876b58..bb478b29b88af4fbcef3a174d8e5405cedd616ea 100644 (file)
@@ -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))";
             }
         }