mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
fix handling of near queries with special search
Make sure to use the classtype tables with near search and allow to search for arbitrary key/values (forbidding it for viewbox searches). Add tests for near queries.
This commit is contained in:
@@ -73,6 +73,12 @@ Feature: Search queries
|
||||
| city |
|
||||
| Montevideo |
|
||||
|
||||
Scenario: Country search with bounded viewbox remain in the area
|
||||
When sending json search query "" with address
|
||||
| bounded | viewbox | country |
|
||||
| 1 | -56.16786,-34.84061,-56.12525,-34.86526 | de |
|
||||
Then less than 1 result is returned
|
||||
|
||||
Scenario: Search with bounded viewboxlbrt in right area
|
||||
When sending json search query "bar" with address
|
||||
| bounded | viewboxlbrt |
|
||||
@@ -90,7 +96,7 @@ Feature: Search queries
|
||||
| ^[^,]*[Rr]estaurant.* |
|
||||
|
||||
Scenario: bounded search remains within viewbox, even with no results
|
||||
When sending json search query "restaurant"
|
||||
When sending json search query "[restaurant]"
|
||||
| bounded | viewbox |
|
||||
| 1 | 43.5403125,-5.6563282,43.54285,-5.662003 |
|
||||
Then less than 1 result is returned
|
||||
|
||||
@@ -84,6 +84,18 @@ Feature: Search queries
|
||||
| class | type |
|
||||
| amenity | place_of_worship |
|
||||
|
||||
Scenario: POI search near given coordinate
|
||||
When sending json search query "restaurant near 47.16712,9.51100"
|
||||
Then results contain
|
||||
| class | type |
|
||||
| amenity | restaurant |
|
||||
|
||||
Scenario: Arbitrary key/value search near given coordinate
|
||||
When sending json search query "[man_made=mast] 47.15739,9.61264"
|
||||
Then results contain
|
||||
| class | type |
|
||||
| man_made | mast |
|
||||
|
||||
# https://trac.openstreetmap.org/ticket/5094
|
||||
Scenario: housenumbers are ordered by complete match first
|
||||
When sending json search query "6395 geminis, montevideo" with address
|
||||
|
||||
Reference in New Issue
Block a user