]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/search.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / website / search.php
index d0c45c70636b7822598600577bd73cea1a4314f4..9940d815ea85a05517577285c324a3f05b1ce727 100755 (executable)
                                $aSpecialTerms[strtolower($aSpecialTerm[1])] = $aSpecialTerm[2];
                        }
 
-                       preg_match_all('/\\[([a-zA-Z]*)\\]/', $sQuery, $aSpecialTermsRaw, PREG_SET_ORDER);
+                       preg_match_all('/\\[([\\w ]*)\\]/u', $sQuery, $aSpecialTermsRaw, PREG_SET_ORDER);
                        $aSpecialTerms = array();
                        if (isset($aStructuredQuery['amenity']) && $aStructuredQuery['amenity'])
                        {
                        {
                                $sQuery = str_replace($aSpecialTerm[0], ' ', $sQuery);
                                $sToken = $oDB->getOne("select make_standard_name('".$aSpecialTerm[1]."') as string");
-                               $sSQL = 'select * from (select word_id,word_token, word, class, type, location, country_code, operator';
+                               $sSQL = 'select * from (select word_id,word_token, word, class, type, country_code, operator';
                                $sSQL .= ' from word where word_token in (\' '.$sToken.'\')) as x where (class is not null and class not in (\'place\')) or country_code is not null';
                                if (CONST_Debug) var_Dump($sSQL);
                                $aSearchWords = $oDB->getAll($sSQL);
                        {
 
                        // Check which tokens we have, get the ID numbers                       
-                       $sSQL = 'select word_id,word_token, word, class, type, location, country_code, operator, search_name_count';
+                       $sSQL = 'select word_id,word_token, word, class, type, country_code, operator, search_name_count';
                        $sSQL .= ' from word where word_token in ('.join(',',array_map("getDBQuoted",$aTokens)).')';
 //                     $sSQL .= ' and search_name_count < '.CONST_Max_Word_Frequency;
-//                     $sSQL .= ' group by word_token, word, class, type, location, country_code';
+//                     $sSQL .= ' group by word_token, word, class, type, country_code';
 
                        if (CONST_Debug) var_Dump($sSQL);