for structured search only accept name terms from the first phrase

Fixes #952.
This commit is contained in:
Sarah Hoffmann 2018-03-01 22:35:34 +01:00
parent 36fa21d7ce
commit fd920fba9b

View File

@ -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;
}
}
}