]> git.openstreetmap.org Git - nominatim.git/commitdiff
remove full-word constraint for possible main words
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 24 Feb 2013 21:55:43 +0000 (22:55 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 24 Feb 2013 21:55:43 +0000 (22:55 +0100)
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

index 8557a29d2374c5644cdd36db87aabeea92cbcd66..b223dbcfb2c60984d27745a3c59ce18a6e75d3ff 100755 (executable)
                                {
                                        $aValidTokens[$aToken['word_token']] = array($aToken);
                                }
                                {
                                        $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);
                                $aWordFrequencyScores[$aToken['word_id']] = $aToken['search_name_count'] + 1;
                        }
                        if (CONST_Debug) var_Dump($aPhrases, $aValidTokens);