X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b6a831443c8f46bfe1be59ecd1cb7a6847fdf948..62e2da1f937882bf55363b0f10d8625200850642:/lib-php/TokenWord.php diff --git a/lib-php/TokenWord.php b/lib-php/TokenWord.php index b9e28d91..e2f7aa4d 100644 --- a/lib-php/TokenWord.php +++ b/lib-php/TokenWord.php @@ -1,4 +1,12 @@ iId = $iId; $this->iSearchNameCount = $iSearchNameCount; $this->iTermCount = $iTermCount; - $this->iMatchScore = $iMatchScore; } public function getId() @@ -66,13 +71,13 @@ class Word if ($this->iTermCount > 1 && ($oPosition->isPhrase('') || !$oPosition->isFirstPhrase()) ) { - $oNewSearch = $oSearch->clone($this->iMatchScore); + $oNewSearch = $oSearch->clone(1); $oNewSearch->addAddressToken($this->iId); return array($oNewSearch); } } elseif (!$oSearch->hasName(true)) { - $oNewSearch = $oSearch->clone($this->iMatchScore); + $oNewSearch = $oSearch->clone(1); $oNewSearch->addNameToken( $this->iId, CONST_Search_NameOnlySearchFrequencyThreshold @@ -93,8 +98,7 @@ class Word 'Type' => 'word', 'Info' => array( 'count' => $this->iSearchNameCount, - 'terms' => $this->iTermCount, - 'score' => $this->iMatchScore + 'terms' => $this->iTermCount ) ); }