Sarah Hoffmann [Thu, 19 May 2022 13:49:36 +0000 (15:49 +0200)]
initial postcode cleaner for simple patterns
Moves postcodes that are either in countries without a postcode
system or don't correspond to the local pattern for postcodes into
a field for a normal address part. Makes them searchable but not as
a special address. This has two consequences: they are no longer a
skippable part of the address and the postcodes cannot be searched
on their own.
Sarah Hoffmann [Thu, 16 Jun 2022 09:20:23 +0000 (11:20 +0200)]
use default ranks when reorganising rank_address
When shifting address ranks, the evaluation is always done against
unshifted address ranks on import because the objects we compare against
have not been indexed yet. This changes for updates when the object have
been touched in the meantime. To ensure consistent behaviour across
imports and updates, always use the unshifted address ranks.
Sarah Hoffmann [Thu, 16 Jun 2022 08:44:16 +0000 (10:44 +0200)]
improve address ordering with mixes of place and admin areas
Resolves a couple of situations where a mixed use of places areas and
administrative boundaries would result in a hierarchy that did not
properly respect the contains relation.
Sarah Hoffmann [Sun, 5 Jun 2022 17:38:14 +0000 (19:38 +0200)]
fix rank inheritance from linked places
When taking over the address rank from a linked place, it needs
to be the originally computed rank, not the one that might have
been adjusted in the meantime. The adjustment was made under the
assumption that the node is not linked.
Sarah Hoffmann [Tue, 31 May 2022 12:16:06 +0000 (14:16 +0200)]
change indexing order for interpolations
Interpolations are now indexed after rank 30 objects. The housenumber
nodes no longer need information from the interpolations while the
interpolations can make use of precomputed postcodes.
Sarah Hoffmann [Mon, 30 May 2022 12:32:36 +0000 (14:32 +0200)]
move quoting hack to wiki loader
The bad quotes around the type for special phrases
specifically occure in the Wiki pages, so it should be
removed by the loader and not in the generic SpecialPhrase
object.
Sarah Hoffmann [Fri, 27 May 2022 14:49:14 +0000 (16:49 +0200)]
allow search for partials consisting of 3 or more words
The search query builder currently rejects searches for partial
names only, when the partial terms are all very frequent to avoid
queries that return too many results.
This change slightly relaxes the condition to allow the search when
there are 3 or more partial terms. With so many terms the number
of matches should be managable.
Sarah Hoffmann [Mon, 23 May 2022 08:11:28 +0000 (10:11 +0200)]
fix bug with keeping linking on updates
When moving the finding of linked places to the precomputation stage,
it was also moved before the statement where the linked_place_id was
removed from the linkee. The result was that the current linkee was
excluded when looking for a linked place on updates because it was
still linked to the boundary to be updated.
Fixed by allowing to either keep the linkage or change to an unlinked
place.
Sarah Hoffmann [Wed, 18 May 2022 08:19:05 +0000 (10:19 +0200)]
remove county nodes in Canada from addresses
Canada has complete coverage for administrative boundaries on
county level. Removing the county nodes from the addresses avoids error
due to a wide-spread doubling of place nodes for city counties.
Sarah Hoffmann [Wed, 11 May 2022 13:03:02 +0000 (15:03 +0200)]
add offline import mode
In offline mode no attempts are made to download data from the internet.
At the moment that only concerns the computation of the database date.
It contacts the main API to get the date.
Sarah Hoffmann [Wed, 11 May 2022 09:54:25 +0000 (11:54 +0200)]
no longer allow fuzzy assignment of country
The fallback country boundaries already contain a sufficiently large
part of the water area, so there is no need to extend the country
assignment even more. Features outside countries should not show a
country in their address.
Sarah Hoffmann [Wed, 11 May 2022 08:25:00 +0000 (10:25 +0200)]
pylint: disable no-self-use check
This checker encourages bad behaviour (namely changing the static
status of a function during inheritence) and will be made optional
in upcoming versions of pylint.