X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c5d98effc0f5fcd8d154b0a3ba3fccd374445685..15a1666f8a1e19c338015fccd502be6cfd5c24df:/lib/SearchDescription.php diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index 1e1955c2..f0106063 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -2,9 +2,9 @@ namespace Nominatim; -require_once(CONST_BasePath.'/lib/SpecialSearchOperator.php'); -require_once(CONST_BasePath.'/lib/SearchContext.php'); -require_once(CONST_BasePath.'/lib/Result.php'); +require_once(CONST_LibDir.'/SpecialSearchOperator.php'); +require_once(CONST_LibDir.'/SearchContext.php'); +require_once(CONST_LibDir.'/Result.php'); /** * Description of a single interpretation of a search query. @@ -257,6 +257,7 @@ class SearchDescription $oSearch = clone $this; $oSearch->iSearchRank++; $oSearch->aAddress = $this->aName; + $oSearch->bRareName = false; $oSearch->aName = array($oSearchTerm->iId => $oSearchTerm->iId); $aNewSearches[] = $oSearch; } @@ -344,7 +345,7 @@ class SearchDescription ) { if ($oSearchTerm->iSearchNameCount < CONST_Max_Word_Frequency) { $oSearch = clone $this; - $oSearch->iSearchRank += $oSearchTerm->iTermCount; + $oSearch->iSearchRank += $oSearchTerm->iTermCount + 1; if (empty($this->aName)) { $oSearch->iSearchRank++; } @@ -355,7 +356,7 @@ class SearchDescription $aNewSearches[] = $oSearch; } else { $oSearch = clone $this; - $oSearch->iSearchRank++; + $oSearch->iSearchRank += $oSearchTerm->iTermCount + 1; $oSearch->aAddressNonSearch[$iWordID] = $iWordID; if (!empty($aFullTokens)) { $oSearch->iSearchRank++;