From: Sarah Hoffmann Date: Sun, 24 Feb 2013 21:55:43 +0000 (+0100) Subject: remove full-word constraint for possible main words X-Git-Tag: v2.2.0~112 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/917d4f691cfe01fb8f17628535f066f6ed750924?ds=inline remove full-word constraint for possible main words Reversing the address did not work most of the time because the address normally only contains the partial version of the word only. See also https://help.openstreetmap.org/questions/16317/warum-werden-straen-bei-suche-nicht-gefunden --- diff --git a/website/search.php b/website/search.php index 8557a29d..b223dbcf 100755 --- a/website/search.php +++ b/website/search.php @@ -431,7 +431,7 @@ { $aValidTokens[$aToken['word_token']] = array($aToken); } - if ($aToken['word_token'][0]==' ' && !$aToken['class'] && !$aToken['country_code']) $aPossibleMainWordIDs[$aToken['word_id']] = 1; + if (!$aToken['class'] && !$aToken['country_code']) $aPossibleMainWordIDs[$aToken['word_id']] = 1; $aWordFrequencyScores[$aToken['word_id']] = $aToken['search_name_count'] + 1; } if (CONST_Debug) var_Dump($aPhrases, $aValidTokens);