X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/b6a831443c8f46bfe1be59ecd1cb7a6847fdf948..6f68c2d805c3fdc903fa3d46093bd1376be3e636:/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 ) ); }