From 917d4f691cfe01fb8f17628535f066f6ed750924 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 24 Feb 2013 22:55:43 +0100 Subject: [PATCH] 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 --- website/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5