mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
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.
This commit is contained in:
@@ -18,6 +18,7 @@ from .typing import SaFromClause
|
||||
from .sql.sqlalchemy_schema import SearchTables
|
||||
from .sql.sqlalchemy_types import Geometry
|
||||
from .logging import log
|
||||
from .config import Configuration
|
||||
|
||||
T = TypeVar('T')
|
||||
|
||||
@@ -31,9 +32,11 @@ class SearchConnection:
|
||||
|
||||
def __init__(self, conn: AsyncConnection,
|
||||
tables: SearchTables,
|
||||
properties: Dict[str, Any]) -> None:
|
||||
properties: Dict[str, Any],
|
||||
config: Configuration) -> None:
|
||||
self.connection = conn
|
||||
self.t = tables
|
||||
self.config = config
|
||||
self._property_cache = properties
|
||||
self._classtables: Optional[Set[str]] = None
|
||||
self.query_timeout: Optional[int] = None
|
||||
|
||||
Reference in New Issue
Block a user