mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-28 23:42:59 +03:00
for structured search only accept name terms from the first phrase
Fixes #952.
This commit is contained in:
parent
36fa21d7ce
commit
fd920fba9b
@ -289,10 +289,14 @@ class SearchDescription
|
||||
$this->aFullNameAddress[$iWordID] = $iWordID;
|
||||
}
|
||||
} else {
|
||||
$oSearch = clone $this;
|
||||
$oSearch->iSearchRank++;
|
||||
$oSearch->aName = array($iWordID => $iWordID);
|
||||
$aNewSearches[] = $oSearch;
|
||||
// in structured search only the first phrase can be the
|
||||
// designated name
|
||||
if ($sPhraseType == '' || $bFirstPhrase) {
|
||||
$oSearch = clone $this;
|
||||
$oSearch->iSearchRank++;
|
||||
$oSearch->aName = array($iWordID => $iWordID);
|
||||
$aNewSearches[] = $oSearch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user