mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-11 13:24:07 +00:00
Give higher penalty to partial search terms
Avoids that the interpreation of a term as partial term is ranked higher than as a special term like postcode or house number. Fixes #847.
This commit is contained in:
@@ -360,7 +360,7 @@ class SearchDescription
|
|||||||
&& (!sizeof($this->aName) || $this->iNamePhrase == $iPhrase)
|
&& (!sizeof($this->aName) || $this->iNamePhrase == $iPhrase)
|
||||||
) {
|
) {
|
||||||
$oSearch = clone $this;
|
$oSearch = clone $this;
|
||||||
$oSearch->iSearchRank++;
|
$oSearch->iSearchRank += 2;
|
||||||
if (!sizeof($this->aName)) {
|
if (!sizeof($this->aName)) {
|
||||||
$oSearch->iSearchRank += 1;
|
$oSearch->iSearchRank += 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user