mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
adapt special terms lookup to new word table
This commit is contained in:
@@ -19,7 +19,7 @@ class Tokenizer
|
|||||||
|
|
||||||
public function checkStatus()
|
public function checkStatus()
|
||||||
{
|
{
|
||||||
$sSQL = "SELECT word_id FROM word WHERE word_token IN (' a')";
|
$sSQL = "SELECT word_id FROM word WHERE word_token == 'a'";
|
||||||
$iWordID = $this->oDB->getOne($sSQL);
|
$iWordID = $this->oDB->getOne($sSQL);
|
||||||
if ($iWordID === false) {
|
if ($iWordID === false) {
|
||||||
throw new Exception('Query failed', 703);
|
throw new Exception('Query failed', 703);
|
||||||
@@ -55,9 +55,8 @@ class Tokenizer
|
|||||||
{
|
{
|
||||||
$aResults = array();
|
$aResults = array();
|
||||||
|
|
||||||
$sSQL = 'SELECT word_id, class, type FROM word ';
|
$sSQL = "SELECT word_id, info->>'class' as class, info->>'type' as type ";
|
||||||
$sSQL .= ' WHERE word_token = \' \' || :term';
|
$sSQL .= ' FROM word WHERE word_token = :term and type = \'S\'';
|
||||||
$sSQL .= ' AND class is not null AND class not in (\'place\')';
|
|
||||||
|
|
||||||
Debug::printVar('Term', $sTerm);
|
Debug::printVar('Term', $sTerm);
|
||||||
Debug::printSQL($sSQL);
|
Debug::printSQL($sSQL);
|
||||||
|
|||||||
Reference in New Issue
Block a user