X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b6a831443c8f46bfe1be59ecd1cb7a6847fdf948..aca6439eb7bc2cc6a6c2d7df0ebdb299c96c9c41:/lib-php/TokenWord.php diff --git a/lib-php/TokenWord.php b/lib-php/TokenWord.php index b9e28d91..59456e35 100644 --- a/lib-php/TokenWord.php +++ b/lib-php/TokenWord.php @@ -13,15 +13,12 @@ class Word private $iSearchNameCount; /// Number of terms in the word. private $iTermCount; - /// Match score. - private $iMatchScore; - public function __construct($iId, $iSearchNameCount, $iTermCount, $iMatchScore = 1) + public function __construct($iId, $iSearchNameCount, $iTermCount) { $this->iId = $iId; $this->iSearchNameCount = $iSearchNameCount; $this->iTermCount = $iTermCount; - $this->iMatchScore = $iMatchScore; } public function getId() @@ -66,13 +63,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 +90,7 @@ class Word 'Type' => 'word', 'Info' => array( 'count' => $this->iSearchNameCount, - 'terms' => $this->iTermCount, - 'score' => $this->iMatchScore + 'terms' => $this->iTermCount ) ); }