remove unused columns from word and search_name_* tables

Removes 'trigram' and 'location' from word.
  Removes 'address', 'importance' and 'country_code' from search_name_*.
  Use full geometry in centroid column of search_name_*.

  Requires migration of existing tables. For more info see pull request
  https://github.com/twain47/Nominatim/pull/45
This commit is contained in:
Sarah Hoffmann
2013-04-09 22:44:05 +02:00
parent 4d2b88dd3e
commit 23d303124e
6 changed files with 34 additions and 32 deletions

View File

@@ -319,7 +319,7 @@
{
$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);
@@ -396,10 +396,10 @@
{
// 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);