remove Token from explicit input for SearchDescription extension

The token string is only required by the PartialToken type, so
it can simply save the token string internally. No need to pass
it to every type.

Also moves the check for multi-word partials to the token loader
code in the tokenizer. Multi-word partials can only happen with
the legacy tokenizer and when the database was loaded with an
older version of Nominatim. No need to keep the check for
everybody.
This commit is contained in:
Sarah Hoffmann
2021-07-15 14:48:20 +02:00
parent ec3f6c9c42
commit 3cd85eaaf1
5 changed files with 13 additions and 11 deletions

View File

@@ -363,7 +363,6 @@ class Geocode
foreach ($aWordsetSearches as $oCurrentSearch) {
foreach ($oValidTokens->get($sToken) as $oSearchTerm) {
$aNewSearches = $oCurrentSearch->extendWithSearchTerm(
$sToken,
$oSearchTerm,
$oPosition
);