Robbe Haesendonck
8e71ff329c
Added version check for PostGis and Postgres
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
992703b15e
Added --prepare-database flag
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
ba5ec80611
Added --no-superuser flag
...
To allow import into already existing databases.
Refs: #2719
2023-12-07 09:04:33 +01:00
Sarah Hoffmann
8a2c6067a2
skip lookup with full names when there are none
2023-12-01 12:11:58 +01:00
Sarah Hoffmann
3c7a28dab0
further restrict stop search criterion
2023-11-29 11:28:54 +01:00
Sarah Hoffmann
0c72a434e0
use restrict for housenumber lookups with few numbers
2023-11-29 11:28:54 +01:00
Sarah Hoffmann
32e7b59b1f
NearSearch needs to inherit penalty from inner search
2023-11-29 11:28:52 +01:00
Sarah Hoffmann
b2319e52ff
correctly exclude streets with housenumber searches
...
Street result are not subject to the full filtering in the SQL
query, so recheck.
2023-11-28 17:53:37 +01:00
Sarah Hoffmann
25279d009a
add tests for interaction of category parameter with category terms
2023-11-28 16:56:08 +01:00
Sarah Hoffmann
3f72ca4bca
rename use of category as POI search to near_item
...
Use the term category only as a short-cut for "tuple of key and value".
2023-11-28 16:27:05 +01:00
Sarah Hoffmann
70dc4957dc
the category parameter in search should result in a qualifier
2023-11-28 12:01:49 +01:00
Sarah Hoffmann
a7f5c6c8f5
drop category tokens when they make up a full phrase
2023-11-26 20:58:50 +01:00
Sarah Hoffmann
a8b023e57e
restrict base results in near search by rank
...
This avoids in particular that roads or POIs are used as base
for the near search when a place result is present.
2023-11-26 17:41:29 +01:00
Sarah Hoffmann
47ca56f21b
deduplicate categories/qualifiers
2023-11-26 17:11:15 +01:00
Sarah Hoffmann
580a7b032f
order near searches by distance instead of importance
2023-11-26 16:48:04 +01:00
Sarah Hoffmann
8fcc2bb7f5
avoid duplicate lines during category search
2023-11-26 14:53:20 +01:00
Sarah Hoffmann
d6fe58f84e
fix polygon selection for classtable lookups
...
Polygons should be used preferably with higher address ranks
where the areas are smaller.
2023-11-25 21:01:27 +01:00
Sarah Hoffmann
4e4d29f653
increase penalty for one-letter words
2023-11-23 10:51:58 +01:00
Sarah Hoffmann
195c13ee8a
more preference for name-only queries in search
2023-11-22 23:57:23 +01:00
Sarah Hoffmann
ac5ef64701
avoid index use when filtering by layer
2023-11-22 20:54:04 +01:00
Sarah Hoffmann
e7dc24c026
add timestamps to text logging
2023-11-22 17:38:32 +01:00
Sarah Hoffmann
155f26060d
avoid index on rank_address in near search
2023-11-22 17:33:17 +01:00
Sarah Hoffmann
a87fe8d8bf
exclude country-level searches with non-address layers
2023-11-22 17:01:41 +01:00
Sarah Hoffmann
6478409b05
improve code to collect the PostGIS version
...
The SQL contained an unchecked string literal, which may in theory be
used to attack the database.
2023-11-16 11:14:29 +01:00
Sarah Hoffmann
9a1b8a67d6
adapt typing to newest version of SQLAlchemy
2023-11-15 19:59:26 +01:00
Sarah Hoffmann
b4ce1fb599
remove now unnecessary type igonre comment
2023-11-01 11:57:57 +01:00
Sarah Hoffmann
2bf8e62580
fix assertion on address list, it may be empty
...
Fixes #3237 .
2023-10-31 21:10:54 +01:00
Sarah Hoffmann
a9ac68a729
restrict geometry size for SQLite
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
84d6b481ae
convert sqlite: add index on parent_place_id
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
613c8635a8
remove type info from SQLALchemy condition functions
...
A boolean type makes the SQLite dialect produce a costruct like
'func() = 1' in WHERE condition. While syntactically correct, it tends
to confuse the query planer.
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
899a04ad26
make code work with Spatialite 4.3
...
Transfer is_address_point into SQLAlchemy function, so that
json.has_key() can use the older json_extract() function.
And work around broken Distance function.
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
d8dca2a3a9
enable BDD tests for sqlite databases
...
The database must currently be created by hand and the name handed
in via -DAPI_TEST_DB='sqlite:...'.
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
8216899a9a
trim all coordinate output to 7 digits
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
b1d419f458
add indexing support for DWithin and intersects for sqlite
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
0417946153
make reverse API work with sqlite
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
37488ee82b
try future annotations to resolve Generics compatibility
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
06bbd501fd
make status API work with sqlite incl. unit tests
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
07e6c5cf69
make details API work with sqlite incl. unit tests
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
d0c91e4acf
make lookup call work with sqlite
...
Includes porting unit tests.
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
114cdafe7e
add exporting of SQLite table
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
837bdecde8
add skeleton code for convert function
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
d9d0e70e5b
streamline SQLAlchemy DB schema
...
Remove all information not strictly used by the frontend as well as
any index information. This will make it easier to create a SQLite
database from the schema.
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
1255efba7f
remove unused code
2023-10-23 11:55:18 +02:00
Sarah Hoffmann
6ad397d4a9
Merge branch 'clean-deleted-relations' of https://github.com/lujoh/Nominatim into lujoh-clean-deleted-relations
2023-10-23 10:47:31 +02:00
lujoh
418f381b49
made age a required argument for the -clean-deleted command
2023-10-20 15:31:55 -04:00
lujoh
9ec26c60ff
adjusted tests for --clean-deleted-relations command
2023-10-17 23:03:37 -04:00
Paweł Wroniszewski
fbe40e005d
Properly validate postcodes with country code
...
Include postcode pattern in postcode normalisation regex, instead of
removing it from postcode pattern in config.
It properly handles postcode validation and normalization when country code
is part of the postcode, e.g. for Isle of Man, Jersey, Anguilla, Andorra,
Cayman Islands and more.
Fixes #3227 .
2023-10-17 01:04:07 +02:00
lujoh
e9efef9095
added subcommand to clean deleted relations for issue # 2444
2023-10-16 11:30:58 -04:00
Sarah Hoffmann
95c3181a35
adapt typing for newer version of mypy
2023-10-16 17:03:48 +02:00
Sarah Hoffmann
12dbfb0777
Merge pull request #3222 from lonvia/fix-river-output
...
Make sure the place name always comes first in output
2023-10-10 11:20:12 +02:00