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:
Sarah Hoffmann
2017-12-17 16:00:44 +01:00
parent 637c5c2936
commit b94229fb8e

View File

@@ -360,7 +360,7 @@ class SearchDescription
&& (!sizeof($this->aName) || $this->iNamePhrase == $iPhrase)
) {
$oSearch = clone $this;
$oSearch->iSearchRank++;
$oSearch->iSearchRank += 2;
if (!sizeof($this->aName)) {
$oSearch->iSearchRank += 1;
}