Sarah Hoffmann
c2cb6722fe
use autocommit when creating tables and indexes
...
Might avoid some deadlock situations with autovacuum.
2025-01-09 17:14:37 +01:00
Sarah Hoffmann
efc09a5cfc
add japanese phrase preprocessing
...
Code adapted from GSOC code by @miku.
2025-01-09 09:24:10 +01:00
Sarah Hoffmann
86ad9efa8a
keep break indicators [:-] during normalisation
...
All punctuation will be converted to '-'. Soft breaks : may be
added by preprocessors. The break signs are only used during
query analysis and are ignored during import token analysis.
2025-01-09 09:21:55 +01:00
Sarah Hoffmann
d984100e23
add inner word break penalty
2025-01-07 21:42:25 +01:00
Sarah Hoffmann
499110f549
add SOFT_PHRASE break and enable parsing
...
Also enables parsing of PART breaks.
2025-01-06 17:10:24 +01:00
Sarah Hoffmann
eeb3d5dd0a
make nominatim callable with themepark style
2024-12-16 10:26:55 +01:00
Sarah Hoffmann
4760e8341b
move lua scripts into a separate directory
2024-12-16 10:26:55 +01:00
Sarah Hoffmann
fbb6edfdaf
add documentation for new query preprocessing
2024-12-13 16:53:08 +01:00
Sarah Hoffmann
2b87c016db
generalize normalization step for search query
...
It is now possible to configure functions for changing the query
input before it is analysed by the tokenizer.
Code is a cleaned-up version of the implementation by @miku.
2024-12-13 14:31:08 +01:00
Sarah Hoffmann
d9b4d1591d
ignore postcode areas on reverse
...
Postcode lookups are best done by doing reverse at a higher
level and then extracting the postcode.
2024-12-12 19:02:00 +01:00
Sarah Hoffmann
416e70b97e
have reverse fall back to country table when no country is found
2024-12-12 17:14:02 +01:00
Sarah Hoffmann
0770eaa5d0
use bbox size for secondary order of results
...
Helps to return the largest object when deduplicating results.
2024-11-19 10:38:50 +01:00
Sarah Hoffmann
98c1b923fc
remove code only needed for older PostgreSQL/PostGIS versions
2024-11-18 10:11:09 +01:00
Sarah Hoffmann
fd1f2bc719
increase minimum versions for PostgreSQL and PostGIS
2024-11-18 09:28:06 +01:00
Sarah Hoffmann
689bcbd6ea
Merge pull request #3590 from lonvia/lookup-per-osm-type
...
Look up different OSM types in placex separately
2024-11-15 09:44:16 +01:00
Sarah Hoffmann
3acd7df5c4
Merge pull request #3588 from lonvia/optional-reverse-api
...
Add support for adding endpoints to server conditionally
2024-11-14 19:33:57 +01:00
Sarah Hoffmann
7d418da564
look up different OSM types in placex separately
...
There are separate indexes on placex for the different OSM types.
PostgreSQL can only use these indexes if the type is fixed per query.
2024-11-14 17:47:01 +01:00
Sarah Hoffmann
20d0fb35ce
enable search endpoint only when search table is available
2024-11-14 08:53:09 +01:00
Sarah Hoffmann
754ff15ebd
move server route creation into async function
2024-11-13 21:27:14 +01:00
danieldegroot2
7c9002cae7
Update lookup.py - Correct spelling for "simultaneously"
...
Corrects minor spelling mistake.
2024-11-13 20:35:37 +01:00
Sarah Hoffmann
2735ea768a
look up all places at once
2024-11-13 14:21:05 +01:00
Sarah Hoffmann
122ecd4626
remove remaining pylint hints
2024-11-10 22:49:29 +01:00
Sarah Hoffmann
1f07967787
fix style issue found by flake8
2024-11-10 22:47:14 +01:00
Sarah Hoffmann
b9e4563beb
fix backward compatibility issues with Python 3.7
2024-10-25 23:43:59 +02:00
Sarah Hoffmann
2c0f2e1ede
remove now unnecessary type-ignores
2024-10-25 17:56:47 +02:00
Sarah Hoffmann
5160a1d577
get bbox of postcode areas into results
2024-09-30 08:58:40 +02:00
Sarah Hoffmann
83013f819b
derive bbox size for postcode nodes from rank_search
2024-09-30 08:58:40 +02:00
Sarah Hoffmann
15eb7f0bb1
add new format 'raw' for CLI commands
...
This dumps the original results with all details available.
2024-09-30 08:58:40 +02:00
Sarah Hoffmann
b2dc01ad81
Revert "work round typing bug in pyosmium 4.0"
...
This reverts commit f960a9bf7f .
2024-09-27 20:19:49 +02:00
Sarah Hoffmann
90e207a497
drop automatic migration from versions <4.3
2024-09-27 12:07:48 +02:00
Sarah Hoffmann
f960a9bf7f
work round typing bug in pyosmium 4.0
2024-09-24 11:51:01 +02:00
Sarah Hoffmann
a690605a96
remove support for unindexed tokens
...
This was a special feature of the legacy tokenizer who would not
index very frequent tokens.
2024-09-22 10:39:10 +02:00
Sarah Hoffmann
b54ff7d766
remove all references to a module path
...
No longer used now that legacy tokenizer is gone.
2024-09-21 17:39:01 +02:00
Sarah Hoffmann
9734bbf240
remove warning about now removed legacy tokenizer
2024-09-21 17:12:35 +02:00
Sarah Hoffmann
b87d6226fb
remove legacy tokenizer and direct tests
2024-09-21 11:38:08 +02:00
Sarah Hoffmann
7717bbf59d
remove remaining references to php code
2024-09-15 15:33:59 +02:00
Sarah Hoffmann
6bc044d9c7
remove website setup
...
The website directory was for PHP scripts only and is no longer
needed.
2024-09-15 11:58:55 +02:00
Sarah Hoffmann
3734f1d0b8
prepare 4.5.0 release
2024-09-11 17:51:38 +02:00
Sarah Hoffmann
882fb16881
restrict use of os.environ in Configuration
...
Only use the OS environment, when the environ parameter is set
to None. Currently it would use the OS env on an empty dict.
2024-09-01 16:17:30 +02:00
Sarah Hoffmann
7f11de0db9
allow None and str for project_dir in NominatimAPI init
2024-08-22 22:49:12 +02:00
Sarah Hoffmann
fd9437277e
import requests library later than osmium
...
requests will usually be pulled in by osmium and is therefore not
a direct dependency of nominatim. Make sure it is only used, when
osmium is present.
2024-08-19 16:36:09 +02:00
Sarah Hoffmann
adce7261ac
translate UsageError in CLI API commands
...
UsageErrors are handled specially and don't show backtraces
unless explicitly requested. We want the same behaviour for
errors coming from the API functions.
2024-08-19 12:02:33 +02:00
Sarah Hoffmann
b01a836d1e
use NominatimAPI in with context in CLI tool
2024-08-19 11:42:22 +02:00
Sarah Hoffmann
c2594aca40
make NominatimAPI[Async] a context manager
...
If close() isn't properly called, it can lead to odd error messages
about uncaught exceptions.
2024-08-19 11:31:38 +02:00
Sarah Hoffmann
feb8cc29a5
improve error message on missing modules from nominatim_api
2024-08-17 10:03:36 +02:00
Sarah Hoffmann
d648561a87
CLI: more useful error messages on JSON formatting errors
2024-08-16 19:47:48 +02:00
Sarah Hoffmann
8e8f7a641b
use custom result formatters in CLI commands
2024-08-16 19:30:57 +02:00
Sarah Hoffmann
19eb4d91a0
add documentation for custom formatters
2024-08-14 18:24:40 +02:00
Sarah Hoffmann
5a61d3d5f6
configurable error formatting and content type in result formatter
2024-08-14 12:00:08 +02:00
Sarah Hoffmann
52ee5dc73c
make API formatter loadable from project directory
2024-08-13 23:21:38 +02:00