X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4e94e661b3657f8ab4e6d839729ef4346438b9f5..ea69733082106f4e8cc6077f744e5ce7ca256f2d:/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 ) ); }