]> git.openstreetmap.org Git - nominatim.git/log
nominatim.git
3 years agobdd: factor out reindexing on updates
Sarah Hoffmann [Tue, 5 Jan 2021 14:17:46 +0000 (15:17 +0100)]
bdd: factor out reindexing on updates

3 years agobdd: move place table inserter into separate file
Sarah Hoffmann [Tue, 5 Jan 2021 11:12:59 +0000 (12:12 +0100)]
bdd: move place table inserter into separate file

Also simplifies usage by implementing a function that inserts
a complete table row.

3 years agobdd: move scene setup to OSM data steps
Sarah Hoffmann [Tue, 5 Jan 2021 10:26:39 +0000 (11:26 +0100)]
bdd: move scene setup to OSM data steps

The step has nothing to do with the database.

3 years agobdd: switch to auto commit mode
Sarah Hoffmann [Tue, 5 Jan 2021 10:22:43 +0000 (11:22 +0100)]
bdd: switch to auto commit mode

Put the connection to the test database into auto-commit mode
and get rid of the explicit commits. Also use cursors always in
context managers and unify the two implementations that copy
data from the place table.

3 years agobdd: remove class for lazy formatting
Sarah Hoffmann [Tue, 5 Jan 2021 09:39:44 +0000 (10:39 +0100)]
bdd: remove class for lazy formatting

assert in combination with format() does the right thing and calls
the __str__() method only when an assertion hits.

3 years agobdd: rename db_ops steps
Sarah Hoffmann [Tue, 5 Jan 2021 09:20:00 +0000 (10:20 +0100)]
bdd: rename db_ops steps

Now all files implementing steps are called steps_*.py.

3 years agobdd: move output format computation into response
Sarah Hoffmann [Tue, 5 Jan 2021 09:17:59 +0000 (10:17 +0100)]
bdd: move output format computation into response

3 years agobdd: move Response classes in own file and simplify
Sarah Hoffmann [Mon, 4 Jan 2021 21:18:01 +0000 (22:18 +0100)]
bdd: move Response classes in own file and simplify

Removes most of the duplicated parse functions, introduces
a common assert_field function with a more expressive error
message.

3 years agobdd: rename and clean up osm_data steps
Sarah Hoffmann [Mon, 4 Jan 2021 19:17:17 +0000 (20:17 +0100)]
bdd: rename and clean up osm_data steps

Move common OPL creation code into a function and remove
unused imports.

3 years agobdd: move external process execution in separate func
Sarah Hoffmann [Mon, 4 Jan 2021 18:58:59 +0000 (19:58 +0100)]
bdd: move external process execution in separate func

3 years agobdd: move NominatimEnvironment into separate file
Sarah Hoffmann [Mon, 4 Jan 2021 16:54:51 +0000 (17:54 +0100)]
bdd: move NominatimEnvironment into separate file

Also cleans up and modernizes the code and adds documentation.

3 years agobdd: move grid generation code into geometry factory
Sarah Hoffmann [Mon, 4 Jan 2021 16:04:47 +0000 (17:04 +0100)]
bdd: move grid generation code into geometry factory

3 years agobdd: move geoemtry creation into separate file
Sarah Hoffmann [Mon, 4 Jan 2021 15:29:15 +0000 (16:29 +0100)]
bdd: move geoemtry creation into separate file

Also renames the OsmDataFactory in the more appropriate
GeometryFactory and modernizes code for python3.

3 years agoremove stale code for python2
Sarah Hoffmann [Mon, 4 Jan 2021 13:14:34 +0000 (14:14 +0100)]
remove stale code for python2

3 years agoMerge pull request #2125 from lonvia/independent-project-directory
Sarah Hoffmann [Mon, 4 Jan 2021 13:10:24 +0000 (14:10 +0100)]
Merge pull request #2125 from lonvia/independent-project-directory

Allow for truely independent project directory

3 years agocreate a temporary project dir for tests
Sarah Hoffmann [Mon, 4 Jan 2021 10:39:45 +0000 (11:39 +0100)]
create a temporary project dir for tests

The project directory contains the website script as
configured through the test configuration. This means
that tests are now completely independet of any
configuration that may be contained in the build
directory.

Also removes the hack to inject additional settings via
a environment variable.

3 years agoconfigure osm2pgsql and module location via cmake
Sarah Hoffmann [Mon, 4 Jan 2021 10:37:56 +0000 (11:37 +0100)]
configure osm2pgsql and module location via cmake

The default location of osm2pgsql and the postgresql module
is decided at compile/installation time and is not necessarily
in the project directory.

With this change it is now possible to have a project directory
that is completely separate from the build directory.

3 years agoMerge pull request #2124 from lonvia/remove-nose
Sarah Hoffmann [Sun, 3 Jan 2021 20:04:59 +0000 (21:04 +0100)]
Merge pull request #2124 from lonvia/remove-nose

Remove nose dependency for tests

3 years agoremove nose requirement from documentation
Sarah Hoffmann [Sun, 3 Jan 2021 16:23:44 +0000 (17:23 +0100)]
remove nose requirement from documentation

3 years agoreplace nose assertions with simple asserts
Sarah Hoffmann [Fri, 1 Jan 2021 14:54:52 +0000 (15:54 +0100)]
replace nose assertions with simple asserts

3 years agoMerge pull request #2119 from mtmail/check-import-finished-when-tables-droped
Sarah Hoffmann [Tue, 22 Dec 2020 14:57:48 +0000 (15:57 +0100)]
Merge pull request #2119 from mtmail/check-import-finished-when-tables-droped

utils/check_import_finished: skip some checks when setup ran with --drop

3 years agoMerge pull request #2118 from mtmail/vagrant-ubuntu-dotenv
Sarah Hoffmann [Tue, 22 Dec 2020 14:54:48 +0000 (15:54 +0100)]
Merge pull request #2118 from mtmail/vagrant-ubuntu-dotenv

Vagrant ubuntu: install dotenv package

3 years agoutils/check_import_finished: skip some checks when setup ran with --drop
marc tobias [Mon, 21 Dec 2020 19:12:31 +0000 (20:12 +0100)]
utils/check_import_finished: skip some checks when setup ran with --drop

3 years agoVagrant ubuntu: install dotenv package
marc tobias [Mon, 21 Dec 2020 19:10:13 +0000 (20:10 +0100)]
Vagrant ubuntu: install dotenv package

3 years agoMerge pull request #2115 from lonvia/use-dotenv
Sarah Hoffmann [Mon, 21 Dec 2020 10:33:38 +0000 (11:33 +0100)]
Merge pull request #2115 from lonvia/use-dotenv

Switch configuration to dotenv

3 years agoswitch documentation to describing dotenv
Sarah Hoffmann [Sun, 20 Dec 2020 11:09:27 +0000 (12:09 +0100)]
switch documentation to describing dotenv

3 years agoadapt instructions for creating the test db to dotenv
Sarah Hoffmann [Sun, 20 Dec 2020 10:53:19 +0000 (11:53 +0100)]
adapt instructions for creating the test db to dotenv

3 years agomark CentOS installation instructions as broken
Sarah Hoffmann [Sun, 20 Dec 2020 10:35:29 +0000 (11:35 +0100)]
mark CentOS installation instructions as broken

Getting symfony-dotenv installed on CentOS is a major pain,
so just mark it broken instead.

Still sSwitch the config format to dotenv already.

3 years agotests: always create the config file
Sarah Hoffmann [Sat, 19 Dec 2020 16:55:46 +0000 (17:55 +0100)]
tests: always create the config file

There is also one database test that uses the API functions.

3 years agoadapt php tests to new directory constants
Sarah Hoffmann [Thu, 17 Dec 2020 15:50:52 +0000 (16:50 +0100)]
adapt php tests to new directory constants

3 years agomake phpcs happy
Sarah Hoffmann [Thu, 17 Dec 2020 15:44:52 +0000 (16:44 +0100)]
make phpcs happy

3 years agogithub actions: need dotenv
Sarah Hoffmann [Thu, 17 Dec 2020 10:53:15 +0000 (11:53 +0100)]
github actions: need dotenv

3 years agomove creation of website scripts to setup script
Sarah Hoffmann [Thu, 17 Dec 2020 13:58:09 +0000 (14:58 +0100)]
move creation of website scripts to setup script

Instead of creating the website wrapper scripts with cmake,
they are now created when --setup-website is called. The
setup of the configuration constants is directly embedded
into the scripts. This means we can get rid of the separate
settings-frontend.php. More importantly however, it means
that it is now possible to set up multiple website directories
from the same build directory.

3 years agoadapt tests to new dotenv environment
Sarah Hoffmann [Thu, 17 Dec 2020 10:46:01 +0000 (11:46 +0100)]
adapt tests to new dotenv environment

DB tests now can simply set the environment to change configuration
variables. API tests still rely on a configuration file.

Also, query.php needs to set up the CONST_* variables to work with
the query scripts. That is a tiny bit messy and duplicates code
but this part will need to be reworked later.

3 years agofix various typos
Sarah Hoffmann [Wed, 16 Dec 2020 19:41:35 +0000 (20:41 +0100)]
fix various typos

3 years agoremove old default settings
Sarah Hoffmann [Wed, 16 Dec 2020 16:21:46 +0000 (17:21 +0100)]
remove old default settings

3 years agoswitch all utils to initialising dotenv
Sarah Hoffmann [Wed, 16 Dec 2020 16:20:58 +0000 (17:20 +0100)]
switch all utils to initialising dotenv

3 years agoswitch remaining settings to dotenv format
Sarah Hoffmann [Tue, 15 Dec 2020 14:37:31 +0000 (15:37 +0100)]
switch remaining settings to dotenv format

CONST_Search_AreaPolygons and CONST_Search_ReversePlanForAll have
been removed completely.

3 years agouse explicit DSN for website scripts
Sarah Hoffmann [Tue, 15 Dec 2020 14:36:13 +0000 (15:36 +0100)]
use explicit DSN for website scripts

Website scripts have no access to the dotenv variables, so use
the DSN constant instead when connecting to the database.

3 years agoreplace database settings with dotenv variant
Sarah Hoffmann [Tue, 15 Dec 2020 14:12:28 +0000 (15:12 +0100)]
replace database settings with dotenv variant

As we can't refer to the project root dir in the module path, the
module path may now also be a relative directory which is then
taken as being relative to the project root path.

Moves the checkModulePresence() function into the Setup class, so
that it can work on the computed absolute module path.

3 years agointroduce dotenv parsing for setup.php
Sarah Hoffmann [Tue, 15 Dec 2020 12:57:34 +0000 (13:57 +0100)]
introduce dotenv parsing for setup.php

This adds the notion of a project directory. This is the directory
that holds all necessary files for one specific installation of
Nominatim. Dotenv looks for an .env file in this directory and
adds it to the global environment together with the defaults from
Nominatim's data directory.

Add's symfony's dotenv library as a new dependency.

3 years agomake HTTP proxy setup explicit
Sarah Hoffmann [Tue, 15 Dec 2020 10:04:19 +0000 (11:04 +0100)]
make HTTP proxy setup explicit

The setup relies on the project configuration which we want to
explicitly set up in later steps. Therefore proxy setup needs to
be done explicitly as well. There is the added bonus that the
setup is done only for the utils which try to call outside.

3 years agoreorganise path settings in config
Sarah Hoffmann [Tue, 15 Dec 2020 09:09:55 +0000 (10:09 +0100)]
reorganise path settings in config

CONST_BasePath is split into separate configuration variables
for binaries, libraries and data. These variables as well as
the installation path are now set in the executable directly and
no longer configurable via project settings.

This is the first step towards an installable software. The
executables should know per installation where to find their
necessary data to execute. Project configuration needs to be
restricted to settings that really concern the specific Nominatim
installation.

3 years agouse /usr/bin/env for python script
Sarah Hoffmann [Mon, 14 Dec 2020 10:26:43 +0000 (11:26 +0100)]
use /usr/bin/env for python script

Makes it easier to use the script with a virtualenv setup.

3 years agoMerge pull request #2112 from lonvia/fix-tests-for-php-8
Sarah Hoffmann [Fri, 18 Dec 2020 13:25:50 +0000 (14:25 +0100)]
Merge pull request #2112 from lonvia/fix-tests-for-php-8

work around failing CI tests

3 years agowork around failing CI tests
Sarah Hoffmann [Thu, 17 Dec 2020 17:51:18 +0000 (18:51 +0100)]
work around failing CI tests

Force use of phpunit7 to avoid an issue with different sort order.

3 years agoIssue templates: require postgres config modifications
Sarah Hoffmann [Fri, 18 Dec 2020 09:37:01 +0000 (10:37 +0100)]
Issue templates: require postgres config modifications

3 years agoIssue templates: more commenting of instructions
Sarah Hoffmann [Wed, 16 Dec 2020 07:41:20 +0000 (08:41 +0100)]
Issue templates: more commenting of instructions

3 years agoIssue templates: put instructions into comments
Sarah Hoffmann [Wed, 16 Dec 2020 07:38:04 +0000 (08:38 +0100)]
Issue templates: put instructions into comments

3 years agoprepare 3.6.0 release v3.6.0
Sarah Hoffmann [Sun, 13 Dec 2020 10:59:16 +0000 (11:59 +0100)]
prepare 3.6.0 release

3 years agoMerge pull request #2105 from lonvia/fix-use-of-records
Sarah Hoffmann [Sun, 13 Dec 2020 08:48:21 +0000 (09:48 +0100)]
Merge pull request #2105 from lonvia/fix-use-of-records

Use a typed record for place info in get_addressdata

3 years agoactions: run tests also on postgresql 9.5
Sarah Hoffmann [Sat, 12 Dec 2020 13:50:07 +0000 (14:50 +0100)]
actions: run tests also on postgresql 9.5

This is the oldest version for which a postgis is available.

3 years agouse a typed record for place info in get_addressdata
Sarah Hoffmann [Sat, 12 Dec 2020 13:46:34 +0000 (14:46 +0100)]
use a typed record for place info in get_addressdata

Older versions of Postgresql cannot handle an untyped record
for INTO.

Fixes #2100.

3 years agoMerge pull request #2102 from mtmail/typo-in-reverse-md
Sarah Hoffmann [Sat, 12 Dec 2020 09:16:23 +0000 (10:16 +0100)]
Merge pull request #2102 from mtmail/typo-in-reverse-md

Reverse.md: fix two typos

3 years agoReverse.md: fix two typos
marc tobias [Fri, 11 Dec 2020 23:30:26 +0000 (00:30 +0100)]
Reverse.md: fix two typos

3 years agoMerge pull request #2101 from lonvia/update-documentation
Sarah Hoffmann [Fri, 11 Dec 2020 17:02:44 +0000 (18:02 +0100)]
Merge pull request #2101 from lonvia/update-documentation

Update documentation

3 years agofix typos
Sarah Hoffmann [Fri, 11 Dec 2020 16:08:13 +0000 (17:08 +0100)]
fix typos

3 years agoupdate import times
Sarah Hoffmann [Tue, 8 Dec 2020 07:57:46 +0000 (08:57 +0100)]
update import times

3 years agoMerge pull request #2099 from lonvia/update-country-names
Sarah Hoffmann [Thu, 10 Dec 2020 16:56:32 +0000 (17:56 +0100)]
Merge pull request #2099 from lonvia/update-country-names

Dynamically update country names from OSM data

3 years agoupdate country names
Sarah Hoffmann [Wed, 9 Dec 2020 16:52:25 +0000 (17:52 +0100)]
update country names

Copies all name:xx country names that are in OSM as of today
into the country name fallback table.

3 years agoupdate country_names from OSM data
Sarah Hoffmann [Wed, 9 Dec 2020 10:38:19 +0000 (11:38 +0100)]
update country_names from OSM data

Update names in the coutry_names table on the fly from incomming
OSM country data. Adding a small sanity check that the country
must be an OSM relation and within the area where we expect the
country to be.

3 years agoMerge pull request #2096 from otbutz/patch-1
Sarah Hoffmann [Wed, 9 Dec 2020 08:55:59 +0000 (09:55 +0100)]
Merge pull request #2096 from otbutz/patch-1

Add link to discussions when creating new issue

3 years agoAdd link to discussions when creating new issue
otbutz [Wed, 9 Dec 2020 08:33:42 +0000 (09:33 +0100)]
Add link to discussions when creating new issue

3 years agoremove bug reporting hints in favour of issue templates
Sarah Hoffmann [Sun, 6 Dec 2020 21:36:04 +0000 (22:36 +0100)]
remove bug reporting hints in favour of issue templates

3 years agoupdates to admin and develop documentation
Sarah Hoffmann [Sun, 6 Dec 2020 16:28:33 +0000 (17:28 +0100)]
updates to admin and develop documentation

Mostly minor updates in wording and resource consumption.

3 years agoupdate API documentation
Sarah Hoffmann [Sat, 5 Dec 2020 15:21:42 +0000 (16:21 +0100)]
update API documentation

* remove traces of HTML output
* add details on artificial objects (see also #1671)
* add geometry output documentation for lookup
* deprecate query by ID via reverse endpoint
* remove /search/<query> query format, no longer supported
* explain better what reverse geocoding does
* lots of smaller fixes to wording

3 years agodo not classify housenumbers as rare
Sarah Hoffmann [Tue, 8 Dec 2020 16:25:15 +0000 (17:25 +0100)]
do not classify housenumbers as rare

House numbers are highly redundant, so don't even attempt to
do it as a rare name search. Greatly improves speed of such
queries.

3 years agoMerge pull request #2092 from lonvia/update-osm2pgsql
Sarah Hoffmann [Tue, 8 Dec 2020 09:56:25 +0000 (10:56 +0100)]
Merge pull request #2092 from lonvia/update-osm2pgsql

Update osm2pgsql to 1.4.0 release

3 years agoupdate osm2pgsql to 1.4.0 release
Sarah Hoffmann [Tue, 8 Dec 2020 09:18:18 +0000 (10:18 +0100)]
update osm2pgsql to 1.4.0 release

3 years agoCreate issue templates
Sarah Hoffmann [Sun, 6 Dec 2020 21:24:45 +0000 (22:24 +0100)]
Create issue templates

3 years agoMerge pull request #2090 from lonvia/avoid-contains-operator
Sarah Hoffmann [Thu, 3 Dec 2020 08:39:50 +0000 (09:39 +0100)]
Merge pull request #2090 from lonvia/avoid-contains-operator

avoid contains operator for geometries

3 years agoavoid contains operator for geometries
Sarah Hoffmann [Wed, 2 Dec 2020 21:18:27 +0000 (22:18 +0100)]
avoid contains operator for geometries

Postgis keeps messing up use of index in some circumstances.

3 years agoMerge pull request #2087 from lonvia/only-one-link-per-node
Sarah Hoffmann [Wed, 2 Dec 2020 21:16:56 +0000 (22:16 +0100)]
Merge pull request #2087 from lonvia/only-one-link-per-node

Place nodes can only be linked once against boundaries

3 years agoMerge pull request #2088 from lonvia/update-osm2pgsql
Sarah Hoffmann [Wed, 2 Dec 2020 21:16:38 +0000 (22:16 +0100)]
Merge pull request #2088 from lonvia/update-osm2pgsql

update osm2pgsql

3 years agoupdate osm2pgsql
Sarah Hoffmann [Wed, 2 Dec 2020 17:27:18 +0000 (18:27 +0100)]
update osm2pgsql

Needs now an explicit switch to avoid propagating changes from
nodes to ways to relations.

3 years agoplace nodes can only be linked once against boundaries
Sarah Hoffmann [Wed, 2 Dec 2020 14:31:02 +0000 (15:31 +0100)]
place nodes can only be linked once against boundaries

If a place node is already linked against a boundary, it should not
be used for linking again. It is usually a sign of a mapping error,
when there are multiple boundary candidates. This change just avoids
inconsistent data in the database, it does not guarantee that the
linking is against the more correct boundary.

3 years agoalso add explicit cast for varchar
Sarah Hoffmann [Tue, 1 Dec 2020 21:15:51 +0000 (22:15 +0100)]
also add explicit cast for varchar

3 years agoMerge pull request #2085 from lonvia/add-address-rank-to-xml-output
Sarah Hoffmann [Tue, 1 Dec 2020 18:59:29 +0000 (19:59 +0100)]
Merge pull request #2085 from lonvia/add-address-rank-to-xml-output

add address rank to XML output

3 years agoMerge pull request #2084 from lonvia/fix-term-count
Sarah Hoffmann [Tue, 1 Dec 2020 18:59:07 +0000 (19:59 +0100)]
Merge pull request #2084 from lonvia/fix-term-count

fix use of term count in partial terms

3 years agoadd address rank to XML output
Sarah Hoffmann [Tue, 1 Dec 2020 16:54:53 +0000 (17:54 +0100)]
add address rank to XML output

The address rank is much more interesting than the search rank
these days because it tells something about the kind of object.

Reverse did have neither rank, so add both for consistency.

3 years agofix use of term count in partial terms
Sarah Hoffmann [Tue, 1 Dec 2020 16:21:01 +0000 (17:21 +0100)]
fix use of term count in partial terms

Term count for partial words is one less than the actual number
of words. Take that into account when adding to the search rank.

Fixes #2081.

3 years agoMerge pull request #2082 from lonvia/compute-address-on-the-fly-II
Sarah Hoffmann [Tue, 1 Dec 2020 15:41:31 +0000 (16:41 +0100)]
Merge pull request #2082 from lonvia/compute-address-on-the-fly-II

Compute address for POIs on the fly

3 years agonull entries need to be typed
Sarah Hoffmann [Tue, 1 Dec 2020 13:54:42 +0000 (14:54 +0100)]
null entries need to be typed

3 years agocompute address parts for rank 30 objects on the fly
Sarah Hoffmann [Tue, 1 Dec 2020 10:58:25 +0000 (11:58 +0100)]
compute address parts for rank 30 objects on the fly

Rank 30 objects usually use the address parts of their parent.
When the parent has address parts that are areas but not marked
as isaddress, then the parent might go through multiple administrative
areas. In that case recheck if the right area has been choosen
for the object in question instead of relying on isaddress.
Note that we really only have to do the recomputation in the
case of 'isarea = True and isaddress = False' which hopefully
keeps the number of additional geometric operations we have to do
to a minimum.

There is one more special case to be taken into account here: a
street may go through two administrative areas and a house along
that street is placed in one of the area while the addr:* tags
says it belongs to the other. In that case we must not switch
the isaddress to the one it is situated. To avoid that recheck
the address names against the name of the ara. That is not perfect
but should cover most cases.

Fixes #328.

3 years agocleanup get_addressdata
Sarah Hoffmann [Mon, 30 Nov 2020 21:54:36 +0000 (22:54 +0100)]
cleanup get_addressdata

Save location data in a ROW instead of using separate varaibles
for each value.

3 years agoMerge pull request #2080 from donalhunt/fix-Migration.md-typos
Sarah Hoffmann [Mon, 30 Nov 2020 15:21:35 +0000 (16:21 +0100)]
Merge pull request #2080 from donalhunt/fix-Migration.md-typos

Migration.md: fix typos, improve style consistency and readability.

3 years agoMigration.md: fix typos, improve style consistency and readability.
Donal Hunt [Mon, 30 Nov 2020 11:59:10 +0000 (11:59 +0000)]
Migration.md: fix typos, improve style consistency and readability.

3 years agoMerge pull request #2079 from lonvia/improve-progress-logging
Sarah Hoffmann [Mon, 30 Nov 2020 10:42:08 +0000 (11:42 +0100)]
Merge pull request #2079 from lonvia/improve-progress-logging

Improve progress logging during indexing

3 years agoimprove progress logging during indexing
Sarah Hoffmann [Mon, 30 Nov 2020 09:59:29 +0000 (10:59 +0100)]
improve progress logging during indexing

Wait for 2 seconds before logging the first progress, so that we
have numbers that are a bit more reliable statistically speaking.

Also provides an actual implementation for the log_interval
parameter and fixes some small style issues.

4 years agoMerge pull request #2077 from lonvia/optimize-large-rank-0-areas
Sarah Hoffmann [Thu, 26 Nov 2020 13:40:54 +0000 (14:40 +0100)]
Merge pull request #2077 from lonvia/optimize-large-rank-0-areas

Restrict size of features that get a full address search

4 years agoMerge pull request #2076 from lonvia/search-name-index-migration
Sarah Hoffmann [Thu, 26 Nov 2020 11:01:38 +0000 (12:01 +0100)]
Merge pull request #2076 from lonvia/search-name-index-migration

Docs: add migration for search_name_* tables

4 years agorestrict size of features that get a full address search
Sarah Hoffmann [Thu, 26 Nov 2020 10:53:58 +0000 (11:53 +0100)]
restrict size of features that get a full address search

It would be nice to always compute addresses for rank 0 objects
over the complete geometry, so that they can be found via all
the admin boundaries that they intersect. However, there are a
couple of extramely large boundaries in OSM (like timezones)
where this results in thousands of possible address candidates
that need to be checked. Fall back to getting the address of the
centroid for them.

4 years agodocs: add migration for search_name_* tables
Sarah Hoffmann [Thu, 26 Nov 2020 08:18:33 +0000 (09:18 +0100)]
docs: add migration for search_name_* tables

4 years agoMerge pull request #2075 from lonvia/filter-postcodes-from-location-area-large
Sarah Hoffmann [Wed, 25 Nov 2020 20:42:27 +0000 (21:42 +0100)]
Merge pull request #2075 from lonvia/filter-postcodes-from-location-area-large

Filter postcodes by search rank when adding to address list

4 years agofilter postcodes by search rank when adding to address list
Sarah Hoffmann [Wed, 25 Nov 2020 19:33:15 +0000 (20:33 +0100)]
filter postcodes by search rank when adding to address list

The post codes are the last part that does not fit the new
address ranking scheme. In particular, the search rank is still
relevant for choosing if a postcode should be included into
the address terms. Filter out irrelevant postcodes in
getNearFeatures() already, to avoid having to check for
geometry relation.

4 years agoMerge pull request #2074 from lonvia/add-housenumber-to-unknown-places
Sarah Hoffmann [Wed, 25 Nov 2020 15:57:09 +0000 (16:57 +0100)]
Merge pull request #2074 from lonvia/add-housenumber-to-unknown-places

Improve finding addresses that have their own search_name entry because of unknown addr:* parts

4 years agoMerge pull request #2073 from lonvia/multi-word-partial-terms-in-search-description
Sarah Hoffmann [Wed, 25 Nov 2020 15:57:00 +0000 (16:57 +0100)]
Merge pull request #2073 from lonvia/multi-word-partial-terms-in-search-description

Improve handling of multi-word partials in SearchDescription

4 years agomake phpcs happy
Sarah Hoffmann [Wed, 25 Nov 2020 15:14:31 +0000 (16:14 +0100)]
make phpcs happy

4 years agodo not use artificial housenumbers as names
Sarah Hoffmann [Wed, 25 Nov 2020 15:11:32 +0000 (16:11 +0100)]
do not use artificial housenumbers as names

If they are artificial they cannot have a search_name entry.

4 years agoimprove handling of multi-word partials in SearchDescription
Sarah Hoffmann [Wed, 25 Nov 2020 10:44:25 +0000 (11:44 +0100)]
improve handling of multi-word partials in SearchDescription

Multi-word partial terms had an undue advantage over separate partial
terms because they only need to pay the penalty once. This changes
the behaviour by setting the penalty according to the number of
words in the token. This should get rid of search interpretations
with low chance of matching.

This also fixes handling of exact term matching. We now match against
all exact terms of the query, not just a couple of them collected
while building the interpretations.

Also adds a penalty to very short postcodes.