mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-29 16:04:07 +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,12 +289,16 @@ class SearchDescription
|
||||
$this->aFullNameAddress[$iWordID] = $iWordID;
|
||||
}
|
||||
} else {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $aNewSearches;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user