Partial terms should only ever consist of one word. Ignore
any other, they are a leftover from inefficient word index
builts.
public function extendWithPartialTerm($sToken, $oSearchTerm, $bStructuredPhrases, $iPhrase, $aFullTokens)
{
// Only allow name terms.
public function extendWithPartialTerm($sToken, $oSearchTerm, $bStructuredPhrases, $iPhrase, $aFullTokens)
{
// Only allow name terms.
- if (!(is_a($oSearchTerm, '\Nominatim\Token\Word'))) {
+ if (!(is_a($oSearchTerm, '\Nominatim\Token\Word'))
+ || strpos($sToken, ' ') !== false
+ ) {
if ((!$this->sPostcode && !$this->aAddress && !$this->aAddressNonSearch)
&& ((empty($this->aName) && empty($this->aNameNonSearch)) || $this->iNamePhrase == $iPhrase)
if ((!$this->sPostcode && !$this->aAddress && !$this->aAddressNonSearch)
&& ((empty($this->aName) && empty($this->aNameNonSearch)) || $this->iNamePhrase == $iPhrase)
- && strpos($sToken, ' ') === false
) {
$oSearch = clone $this;
$oSearch->iSearchRank++;
) {
$oSearch = clone $this;
$oSearch->iSearchRank++;