Turn an area search into the words the Routing API accepts.
Each term is normalised to NFKC (composed umlauts, ASCII digits for fullwidth
ones), then split on whitespace AND punctuation, keeping letters, digits and
the * wildcard: the API ANDs the expressions and 500s on a space or on
punctuation such as (, ), . or - inside one, so "Frankfurt am Main" is
sent as three expressions and "Halle (Westf.)" as "Halle" + "Westf".
The API then rejects the whole search (HTTP 400 "Constraint Violation") for a
word with fewer than 2 non-wildcard characters ("Frankfurt a. M." → "a", "M"; a
bare ""), and for more than 10 words. So a too-short word is left out (it is
listed in dropped, and the characters split at in separators), a word repeated
in any letter case is sent once, and the
rest throws a FitConnectValidationError: no usable word left, more than
MAX_AREA_SEARCH_WORDS words, or a word whose * splits it into parts
shorter than 2 characters ("ab").
Turn an area search into the words the Routing API accepts.
Each term is normalised to NFKC (composed umlauts, ASCII digits for fullwidth ones), then split on whitespace AND punctuation, keeping letters, digits and the
*wildcard: the API ANDs the expressions and 500s on a space or on punctuation such as(,),.or-inside one, so "Frankfurt am Main" is sent as three expressions and "Halle (Westf.)" as "Halle" + "Westf".The API then rejects the whole search (HTTP 400 "Constraint Violation") for a word with fewer than 2 non-wildcard characters ("Frankfurt a. M." → "a", "M"; a bare ""), and for more than 10 words. So a too-short word is left out (it is listed in
dropped, and the characters split at inseparators), a word repeated in any letter case is sent once, and the rest throws aFitConnectValidationError: no usable word left, more than MAX_AREA_SEARCH_WORDS words, or a word whose*splits it into parts shorter than 2 characters ("ab").