forked from hans/Nominatim
Merge pull request #2084 from lonvia/fix-term-count
fix use of term count in partial terms
This commit is contained in:
@@ -344,7 +344,7 @@ class SearchDescription
|
|||||||
) {
|
) {
|
||||||
if ($oSearchTerm->iSearchNameCount < CONST_Max_Word_Frequency) {
|
if ($oSearchTerm->iSearchNameCount < CONST_Max_Word_Frequency) {
|
||||||
$oSearch = clone $this;
|
$oSearch = clone $this;
|
||||||
$oSearch->iSearchRank += $oSearchTerm->iTermCount;
|
$oSearch->iSearchRank += $oSearchTerm->iTermCount + 1;
|
||||||
if (empty($this->aName)) {
|
if (empty($this->aName)) {
|
||||||
$oSearch->iSearchRank++;
|
$oSearch->iSearchRank++;
|
||||||
}
|
}
|
||||||
@@ -355,7 +355,7 @@ class SearchDescription
|
|||||||
$aNewSearches[] = $oSearch;
|
$aNewSearches[] = $oSearch;
|
||||||
} else {
|
} else {
|
||||||
$oSearch = clone $this;
|
$oSearch = clone $this;
|
||||||
$oSearch->iSearchRank++;
|
$oSearch->iSearchRank += $oSearchTerm->iTermCount + 1;
|
||||||
$oSearch->aAddressNonSearch[$iWordID] = $iWordID;
|
$oSearch->aAddressNonSearch[$iWordID] = $iWordID;
|
||||||
if (!empty($aFullTokens)) {
|
if (!empty($aFullTokens)) {
|
||||||
$oSearch->iSearchRank++;
|
$oSearch->iSearchRank++;
|
||||||
|
|||||||
Reference in New Issue
Block a user