mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-24 06:22:08 +03:00
for structured queries assume 2 char country param values are a iso country code
This commit is contained in:
parent
fb76671ab9
commit
4bc40d2c0b
@ -416,6 +416,13 @@
|
||||
$aWordFrequencyScores = array();
|
||||
foreach($aDatabaseWords as $aToken)
|
||||
{
|
||||
// Very special case - require 2 letter country param to match the country code found
|
||||
if ($bStructuredPhrases && $aToken['country_code'] && !empty($aStructuredQuery['country'])
|
||||
&& strlen($aStructuredQuery['country']) == 2 && strtolower($aStructuredQuery['country']) != $aToken['country_code'])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isset($aValidTokens[$aToken['word_token']]))
|
||||
{
|
||||
$aValidTokens[$aToken['word_token']][] = $aToken;
|
||||
|
Loading…
Reference in New Issue
Block a user