]> git.openstreetmap.org Git - nominatim.git/commitdiff
assume name for special operator in bounded search
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 17 Dec 2017 22:50:16 +0000 (23:50 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 17 Dec 2017 22:50:16 +0000 (23:50 +0100)
With bounded=1 we already have a restricted area, so it does
not make sense to interpret the query as a near search.

Fixes #311.

lib/SearchDescription.php

index 13775d65fd9c94c19e27a47f1ea64beb46f8f543..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;