mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
for structured search only accept name terms from the first phrase
Fixes #952.
This commit is contained in:
@@ -289,10 +289,14 @@ class SearchDescription
|
|||||||
$this->aFullNameAddress[$iWordID] = $iWordID;
|
$this->aFullNameAddress[$iWordID] = $iWordID;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$oSearch = clone $this;
|
// in structured search only the first phrase can be the
|
||||||
$oSearch->iSearchRank++;
|
// designated name
|
||||||
$oSearch->aName = array($iWordID => $iWordID);
|
if ($sPhraseType == '' || $bFirstPhrase) {
|
||||||
$aNewSearches[] = $oSearch;
|
$oSearch = clone $this;
|
||||||
|
$oSearch->iSearchRank++;
|
||||||
|
$oSearch->aName = array($iWordID => $iWordID);
|
||||||
|
$aNewSearches[] = $oSearch;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user