2023-12-06 22:57:09 +03:00
@SQLITE
2016-12-19 23:38:42 +03:00
@APIDB
Feature : Search queries
G e n e r i c s e a r c h r e s u l t c o r r e c t n e s s
2023-10-04 15:41:19 +03:00
Scenario : Search for natural object
When s e n d i n g j s o n s e a r c h q u e r y " S a m i n a "
| a c c e p t - l a n g u a g e |
| e n |
Then r e s u l t s c o n t a i n
| I D | c l a s s | t y p e | d i s p l a y _ n a m e |
| 0 | w a t e r w a y | r i v e r | S a m i n a , A u s t r i a |
2016-12-19 23:38:42 +03:00
Scenario : House number search for non-street address
2021-01-09 18:59:46 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " 6 S i l u m , L i e c h t e n s t e i n " w i t h a d d r e s s
2016-12-19 23:38:42 +03:00
| a c c e p t - l a n g u a g e |
| e n |
Then a d d r e s s o f r e s u l t 0 i s
| t y p e | v a l u e |
2021-01-09 18:59:46 +03:00
| h o u s e _ n u m b e r | 6 |
| v i l l a g e | S i l u m |
| t o w n | T r i e s e n b e r g |
| c o u n t y | O b e r l a n d |
| p o s t c o d e | 9 4 9 7 |
| c o u n t r y | L i e c h t e n s t e i n |
| c o u n t r y _ c o d e | l i |
2022-04-07 15:09:08 +03:00
| I S O 3 1 6 6 - 2 - l v l 8 | L I - 1 0 |
2021-01-09 18:59:46 +03:00
Scenario : House number interpolation
When s e n d i n g j s o n s e a r c h q u e r y " G r o s s s t e g 1 0 2 3 , T r i e s e n b e r g " w i t h a d d r e s s
2016-12-19 23:38:42 +03:00
| a c c e p t - l a n g u a g e |
| d e |
2020-10-11 11:32:35 +03:00
Then a d d r e s s o f r e s u l t 0 c o n t a i n s
2018-09-28 19:05:10 +03:00
| t y p e | v a l u e |
2021-01-09 18:59:46 +03:00
| h o u s e _ n u m b e r | 1 0 2 3 |
| r o a d | G r o s s s t e g |
| v i l l a g e | S ü c k a |
| p o s t c o d e | 9 4 9 7 |
| t o w n | T r i e s e n b e r g |
| c o u n t r y | L i e c h t e n s t e i n |
| c o u n t r y _ c o d e | l i |
2016-12-19 23:38:42 +03:00
2017-10-04 01:05:34 +03:00
Scenario : With missing housenumber search falls back to road
2021-01-09 18:59:46 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " B ü n d a w e g 5 5 5 " w i t h a d d r e s s
2017-10-04 01:05:34 +03:00
Then a d d r e s s o f r e s u l t 0 i s
2021-01-09 18:59:46 +03:00
| t y p e | v a l u e |
| r o a d | B ü n d a w e g |
| v i l l a g e | S i l u m |
| p o s t c o d e | 9 4 9 7 |
| c o u n t y | O b e r l a n d |
| t o w n | T r i e s e n b e r g |
| c o u n t r y | L i e c h t e n s t e i n |
| c o u n t r y _ c o d e | l i |
2022-04-07 15:09:08 +03:00
| I S O 3 1 6 6 - 2 - l v l 8 | L I - 1 0 |
2017-10-04 01:05:34 +03:00
2019-12-01 22:36:59 +03:00
Scenario Outline : Housenumber 0 can be found
2021-01-09 18:59:46 +03:00
When s e n d i n g <format> s e a r c h q u e r y " G n a l p s t r a s s e 0 " w i t h a d d r e s s
2019-12-01 22:36:59 +03:00
Then r e s u l t s c o n t a i n
| d i s p l a y _ n a m e |
2021-01-09 18:59:46 +03:00
| ^ 0 , . * |
2019-12-01 22:36:59 +03:00
And r e s u l t a d d r e s s e s c o n t a i n
| h o u s e _ n u m b e r |
| 0 |
Examples :
| f o r m a t |
| x m l |
| j s o n |
| j s o n v 2 |
| g e o j s o n |
2016-12-19 23:38:42 +03:00
@Tiger
Scenario : TIGER house number
2021-01-09 18:59:46 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " 6 9 7 U p p e r K i n g s t o n R o a d "
2016-12-19 23:38:42 +03:00
Then r e s u l t s c o n t a i n
2021-01-09 18:59:46 +03:00
| o s m _ t y p e | d i s p l a y _ n a m e |
| w a y | ^ 6 9 7 , . * |
2016-12-19 23:38:42 +03:00
Scenario : Search with class-type feature
2021-10-26 13:07:13 +03:00
When s e n d i n g j s o n v 2 s e a r c h q u e r y " b a r s i n e b e n h o l z "
2016-12-19 23:38:42 +03:00
Then r e s u l t s c o n t a i n
| p l a c e _ r a n k |
| 3 0 |
2016-12-21 22:28:27 +03:00
2017-09-18 00:30:08 +03:00
Scenario : Search with specific amenity
When s e n d i n g j s o n s e a r c h q u e r y " [ r e s t a u r a n t ] V a d u z " w i t h a d d r e s s
Then r e s u l t a d d r e s s e s c o n t a i n
| c o u n t r y |
| L i e c h t e n s t e i n |
And r e s u l t s c o n t a i n
| c l a s s | t y p e |
| a m e n i t y | r e s t a u r a n t |
2021-01-17 00:20:23 +03:00
Scenario : Search with specific amenity also work in country
When s e n d i n g j s o n s e a r c h q u e r y " r e s t a u r a n t s i n l i e c h t e n s t e i n " w i t h a d d r e s s
Then r e s u l t a d d r e s s e s c o n t a i n
| c o u n t r y |
| L i e c h t e n s t e i n |
And r e s u l t s c o n t a i n
| c l a s s | t y p e |
| a m e n i t y | r e s t a u r a n t |
2017-09-18 23:07:08 +03:00
Scenario : Search with key-value amenity
2021-01-09 18:59:46 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " [ c l u b = s c o u t ] V a d u z "
2017-09-18 23:07:08 +03:00
Then r e s u l t s c o n t a i n
| c l a s s | t y p e |
2021-01-09 18:59:46 +03:00
| c l u b | s c o u t |
2017-09-18 23:07:08 +03:00
2017-09-19 01:07:11 +03:00
Scenario : POI search near given coordinate
When s e n d i n g j s o n s e a r c h q u e r y " r e s t a u r a n t n e a r 4 7 . 1 6 7 1 2 , 9 . 5 1 1 0 0 "
Then r e s u l t s c o n t a i n
| c l a s s | t y p e |
| a m e n i t y | r e s t a u r a n t |
Scenario : Arbitrary key/value search near given coordinate
2021-01-09 18:59:46 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " [ l e i s u r e = f i r e p i t ] 4 7 . 1 5 0 ° N 9 . 5 3 4 0 4 9 3 ° E "
2017-10-04 01:05:34 +03:00
Then r e s u l t s c o n t a i n
2021-01-09 18:59:46 +03:00
| c l a s s | t y p e |
| l e i s u r e | f i r e p i t |
2017-10-04 01:05:34 +03:00
2024-01-16 19:19:21 +03:00
Scenario : POI search in a bounded viewbox
When s e n d i n g j s o n s e a r c h q u e r y " r e s t a u r a n t s "
| v i e w b o x | b o u n d e d |
| 9 . 5 0 8 3 0 , 4 7 . 1 5 2 5 3 , 9 . 5 2 0 4 3 , 4 7 . 1 4 8 6 6 | 1 |
Then r e s u l t s c o n t a i n
| c l a s s | t y p e |
| a m e n i t y | r e s t a u r a n t |
2021-01-17 00:20:23 +03:00
Scenario Outline : Key/value search near given coordinate can be restricted to country
When s e n d i n g j s o n s e a r c h q u e r y " [ n a t u r a l = p e a k ] 4 7 . 0 6 5 1 2 , 9 . 5 3 9 6 5 " w i t h a d d r e s s
| c o u n t r y c o d e s |
| <cc> |
Then r e s u l t a d d r e s s e s c o n t a i n
| c o u n t r y _ c o d e |
| <cc> |
Examples :
| c c |
| l i |
| c h |
2017-10-04 01:05:34 +03:00
Scenario : Name search near given coordinate
2021-01-09 18:59:46 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " s p o r r y " w i t h a d d r e s s
Then r e s u l t a d d r e s s e s c o n t a i n
| I D | t o w n |
| 0 | V a d u z |
When s e n d i n g j s o n s e a r c h q u e r y " s p o r r y , 4 7 . 1 0 7 9 1 , 9 . 5 2 6 7 6 " w i t h a d d r e s s
Then r e s u l t a d d r e s s e s c o n t a i n
| I D | v i l l a g e |
| 0 | T r i e s e n |
2017-10-04 01:05:34 +03:00
Scenario : Name search near given coordinate without result
2021-01-09 18:59:46 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " s p o r r y , N 4 7 1 5 7 W 9 6 1 2 6 "
2017-10-04 01:05:34 +03:00
Then e x a c t l y 0 r e s u l t s a r e r e t u r n e d
2017-10-03 00:09:45 +03:00
Scenario : Arbitrary key/value search near a road
2021-01-09 18:59:46 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " [ a m e n i t y = d r i n k i n g _ w a t e r ] W i s s f l ä c k a w e g "
2017-10-03 00:09:45 +03:00
Then r e s u l t s c o n t a i n
| c l a s s | t y p e |
2021-01-09 18:59:46 +03:00
| a m e n i t y | d r i n k i n g _ w a t e r |
2017-10-03 00:09:45 +03:00
Scenario : Ignore other country codes in structured search with country
When s e n d i n g j s o n s e a r c h q u e r y " "
| c i t y | c o u n t r y |
| l i | d e |
Then e x a c t l y 0 r e s u l t s a r e r e t u r n e d
Scenario : Ignore country searches when query is restricted to countries
2021-05-05 11:00:34 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " f r "
2017-10-03 00:09:45 +03:00
| c o u n t r y c o d e s |
| l i |
Then e x a c t l y 0 r e s u l t s a r e r e t u r n e d
2021-01-17 00:20:23 +03:00
Scenario : Country searches only return results for the given country
When s e n d i n g s e a r c h q u e r y " A n s T r a i l " w i t h a d d r e s s
| c o u n t r y c o d e s |
| l i |
Then r e s u l t a d d r e s s e s c o n t a i n
| c o u n t r y _ c o d e |
| l i |
2016-12-21 22:28:27 +03:00
# https://trac.openstreetmap.org/ticket/5094
Scenario : housenumbers are ordered by complete match first
2021-01-09 18:59:46 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " A u s t r a s s e 1 1 , V a d u z " w i t h a d d r e s s
2016-12-21 22:28:27 +03:00
Then r e s u l t a d d r e s s e s c o n t a i n
| I D | h o u s e _ n u m b e r |
2021-01-09 18:59:46 +03:00
| 0 | 1 1 |
2016-12-21 22:28:27 +03:00
2021-01-09 18:59:46 +03:00
Scenario Outline : Coordinate searches with white spaces
2020-04-02 02:34:40 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " <data> "
Then e x a c t l y 1 r e s u l t i s r e t u r n e d
And r e s u l t s c o n t a i n
| c l a s s |
2021-01-09 18:59:46 +03:00
| n a t u r a l |
2020-04-02 02:34:40 +03:00
Examples :
| d a t a |
2021-01-09 18:59:46 +03:00
| s p o r r y w e i h e r , N 4 7 . 1 0 7 9 1 ° E 9 . 5 2 6 7 6 ° |
| s p o r r y w e i h e r , N 4 7 . 1 0 7 9 1 ° E 9 . 5 2 6 7 6 ° |
| s p o r r y w e i h e r , N 4 7 . 1 0 7 9 1 ° E 9 . 5 2 6 7 6 ° |
| s p o r r y w e i h e r , N 4 7 . 1 0 7 9 1 ° E 9 . 5 2 6 7 6 ° |
| s p o r r y w e i h e r , N 4 7 . 1 0 7 9 1 ° E 9 . 5 2 6 7 6 ° |
Scenario : Searches with white spaces
When s e n d i n g j s o n s e a r c h q u e r y " 5 2 B o d a s t r , T r i e s e n b e r g "
2020-04-02 02:34:40 +03:00
Then r e s u l t s c o n t a i n
| c l a s s | t y p e |
2020-08-03 17:57:06 +03:00
| h i g h w a y | r e s i d e n t i a l |
2020-09-17 19:17:01 +03:00
# github #1949
Scenario : Addressdetails always return the place type
2021-01-09 18:59:46 +03:00
When s e n d i n g j s o n s e a r c h q u e r y " V a d u z " w i t h a d d r e s s
2020-09-17 19:17:01 +03:00
Then r e s u l t a d d r e s s e s c o n t a i n
2021-01-09 18:59:46 +03:00
| I D | t o w n |
| 0 | V a d u z |
2021-01-17 00:20:23 +03:00
Scenario : Search can handle complex query word sets
When s e n d i n g s e a r c h q u e r y " a u s s e n s t e l l e u n i v e r s i t a t l i c h t e n s t e i n w a c h t e r h a u s a u s s e n s t e l l e u n i v e r s i t a t l i c h t e n s t e i n w a c h t e r h a u s a u s s e n s t e l l e u n i v e r s i t a t l i c h t e n s t e i n w a c h t e r h a u s a u s s e n s t e l l e u n i v e r s i t a t l i c h t e n s t e i n w a c h t e r h a u s "
Then a H T T P 200 i s r e t u r n e d