X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4e94e661b3657f8ab4e6d839729ef4346438b9f5..5adc3167d833bc2fb73d4a19f3c68b1e7a42ee3e:/lib-php/TokenWord.php diff --git a/lib-php/TokenWord.php b/lib-php/TokenWord.php index b9e28d91..a7557d38 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() @@ -57,7 +62,7 @@ class Word public function extendSearch($oSearch, $oPosition) { // Full words can only be a name if they appear at the beginning - // of the phrase. In structured search the name must forcably in + // of the phrase. In structured search the name must forcibly in // the first phrase. In unstructured search it may be in a later // phrase when the first phrase is a house number. if ($oSearch->hasName() @@ -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 ) ); }