mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
remove check for class/type shortcuts which were never implemented
fixes #266
This commit is contained in:
@@ -578,18 +578,6 @@
|
|||||||
else $aSearch['sOperator'] = 'near'; // near = in for the moment
|
else $aSearch['sOperator'] = 'near'; // near = in for the moment
|
||||||
if (strlen($aSearchTerm['operator']) == 0) $aSearch['iSearchRank'] += 1;
|
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 ($aSearch['iSearchRank'] < $this->iMaxRank) $aNewWordsetSearches[] = $aSearch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -768,7 +756,6 @@
|
|||||||
if (!$this->sQuery && !$this->aStructuredQuery) return false;
|
if (!$this->sQuery && !$this->aStructuredQuery) return false;
|
||||||
|
|
||||||
$sLanguagePrefArraySQL = "ARRAY[".join(',',array_map("getDBQuoted",$this->aLangPrefOrder))."]";
|
$sLanguagePrefArraySQL = "ARRAY[".join(',',array_map("getDBQuoted",$this->aLangPrefOrder))."]";
|
||||||
|
|
||||||
$sCountryCodesSQL = false;
|
$sCountryCodesSQL = false;
|
||||||
if ($this->aCountryCodes && sizeof($this->aCountryCodes))
|
if ($this->aCountryCodes && sizeof($this->aCountryCodes))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -74,3 +74,9 @@ Feature: Search queries
|
|||||||
Then results contain
|
Then results contain
|
||||||
| ID | display_name
|
| ID | display_name
|
||||||
| 0 | Illinois.*
|
| 0 | Illinois.*
|
||||||
|
|
||||||
|
Scenario: Search with class-type feature
|
||||||
|
When sending jsonv2 search query "Hotel California"
|
||||||
|
Then results contain
|
||||||
|
| place_rank
|
||||||
|
| 30
|
||||||
|
|||||||
Reference in New Issue
Block a user