]> git.openstreetmap.org Git - nominatim.git/commitdiff
remove check for class/type shortcuts which were never implemented
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 28 Apr 2015 19:37:51 +0000 (21:37 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 28 Apr 2015 19:37:51 +0000 (21:37 +0200)
fixes #266

lib/Geocode.php
tests/features/api/search.feature

index 7bd4f55295513518794abbcc5e91405a3b2c9a69..5f4a01740a00490912c93626424f7b34b7ace640 100644 (file)
                                                                                        else $aSearch['sOperator'] = 'near'; // near = in for the moment
                                                                                        if (strlen($aSearchTerm['operator']) == 0) $aSearch['iSearchRank'] += 1;
 
-                                                                                       // Do we have a shortcut id?
-                                                                                       if ($aSearch['sOperator'] == 'name')
-                                                                                       {
-                                                                                               $sSQL = "select get_tagpair('".$aSearch['sClass']."', '".$aSearch['sType']."')";
-                                                                                               if ($iAmenityID = $this->oDB->getOne($sSQL))
-                                                                                               {
-                                                                                                       $aValidTokens[$aSearch['sClass'].':'.$aSearch['sType']] = array('word_id' => $iAmenityID);
-                                                                                                       $aSearch['aName'][$iAmenityID] = $iAmenityID;
-                                                                                                       $aSearch['sClass'] = '';
-                                                                                                       $aSearch['sType'] = '';
-                                                                                               }
-                                                                                       }
                                                                                        if ($aSearch['iSearchRank'] < $this->iMaxRank) $aNewWordsetSearches[] = $aSearch;
                                                                                }
                                                                        }
                        if (!$this->sQuery && !$this->aStructuredQuery) return false;
 
                        $sLanguagePrefArraySQL = "ARRAY[".join(',',array_map("getDBQuoted",$this->aLangPrefOrder))."]";
-
                        $sCountryCodesSQL = false;
                        if ($this->aCountryCodes && sizeof($this->aCountryCodes))
                        {
index ac378b0e0d6c137a71b13ea54bd0eb417504e9b4..859faa76f1256847d18e3eb703d6da8bbe026c02 100644 (file)
@@ -74,3 +74,9 @@ Feature: Search queries
         Then results contain
           | ID | display_name
           | 0  | Illinois.*
+
+    Scenario: Search with class-type feature
+        When sending jsonv2 search query "Hotel California"
+        Then results contain
+          | place_rank
+          | 30