]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/SearchDescription.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / SearchDescription.php
index d78bf975d3c7f07702f6303f1c366a9af78b8bf4..5431b3eb957907417d38f130a3dd91abeb6bfc6f 100644 (file)
@@ -262,7 +262,7 @@ class SearchDescription
 
                 $iOp = Operator::NEAR; // near == in for the moment
                 if ($aSearchTerm['operator'] == '') {
-                    if (sizeof($this->aName)) {
+                    if (sizeof($this->aName) || $this->oContext->isBoundedSearch()) {
                         $iOp = Operator::NAME;
                     }
                     $oSearch->iSearchRank += 2;
@@ -360,7 +360,7 @@ class SearchDescription
             && (!sizeof($this->aName) || $this->iNamePhrase == $iPhrase)
         ) {
             $oSearch = clone $this;
-            $oSearch->iSearchRank++;
+            $oSearch->iSearchRank += 2;
             if (!sizeof($this->aName)) {
                 $oSearch->iSearchRank += 1;
             }