X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/788ba6d985a47ac9429ca1af68485668313e73a5..c5d98effc0f5fcd8d154b0a3ba3fccd374445685:/lib/Geocode.php?ds=sidebyside diff --git a/lib/Geocode.php b/lib/Geocode.php index b07d1ade..ed02848e 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -650,6 +650,8 @@ class Geocode $this->oNormalizer ); + $oCtx->setFullNameWords($oValidTokens->getFullWordIDs()); + // Try more interpretations for Tokens that could not be matched. foreach ($aTokens as $sToken) { if ($sToken[0] == ' ' && !$oValidTokens->contains($sToken)) { @@ -934,6 +936,8 @@ class Geocode } else { $aResult['foundorder'] += 0.01; } + // - rank + $aResult['foundorder'] -= 0.00001 * (30 - $aResult['rank_search']); // Adjust importance for the number of exact string matches in the result $iCountWords = 0;