]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/db/sqlalchemy_functions.py
extend sqlite converter for search tables
[nominatim.git] / nominatim / db / sqlalchemy_functions.py
index 8b1967381cf0a89422ab0d6efae26b2ae611ac75..5872401cca449d47790cb25e9641699122767e7b 100644 (file)
@@ -117,18 +117,6 @@ def sqlite_is_below_reverse_distance(element: IsBelowReverseDistance,
                                                   compiler.process(rank, **kw))
 
 
-def select_index_placex_geometry_reverse_lookupplacenode(table: str) -> 'sa.TextClause':
-    """ Create an expression with the necessary conditions over a placex
-        table that the index 'idx_placex_geometry_reverse_lookupPlaceNode'
-        can be used.
-    """
-    return sa.text(f"{table}.rank_address between 4 and 25"
-                   f" AND {table}.type != 'postcode'"
-                   f" AND {table}.name is not null"
-                   f" AND {table}.linked_place_id is null"
-                   f" AND {table}.osm_type = 'N'")
-
-
 class IsAddressPoint(sa.sql.functions.GenericFunction[Any]):
     name = 'IsAddressPoint'
     inherit_cache = True