]> git.openstreetmap.org Git - nominatim.git/commitdiff
actually write back the reversed final phrase when reversing the query
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 4 Feb 2015 19:29:38 +0000 (20:29 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 4 Feb 2015 19:29:38 +0000 (20:29 +0100)
lib/Geocode.php
tests/features/api/regression.feature

index 22ad43327adcfd7cf3851257886cd9c1e226d118..e441e8869c479a7cc351e77290018054de310365 100644 (file)
                                                if (sizeof($aPhrases) > 1)
                                                {
                                                        $aFinalPhrase = end($aPhrases);
-                                                       $aFinalPhrase['wordsets'] = getInverseWordSets($aFinalPhrase['words'], 0);
+                                                       $aPhrases[sizeof($aPhrases)-1]['wordsets'] = getInverseWordSets($aFinalPhrase['words'], 0);
                                                }
                                                $aReverseGroupedSearches = $this->getGroupedSearches($aSearches, null, $aPhrases, $aValidTokens, $aWordFrequencyScores, false);
 
index f5a94d30daa6ee085229c93da08ef2846814b8ef..cd9e84776b8126e8246b734ed9e3a2c9e982ba9e 100644 (file)
@@ -1,19 +1,6 @@
 Feature: API regression tests
     Tests error cases reported in tickets.
 
-    @poldi-only
-    Scenario Outline: github #36
-        When sending json search query "<query>" with address
-        Then result addresses contain
-         | ID | road     | city
-         | 0  | Seegasse | Wieselburg-Land
-
-    Examples:
-         | query
-         | Seegasse, Gemeinde Wieselburg-Land
-         | Seegasse, Wieselburg-Land
-         | Seegasse, Wieselburg
-
     Scenario: trac #2430
         When sending json search query "89 River Avenue, Hoddesdon, Hertfordshire, EN11 0JT"
         Then at least 1 result is returned
@@ -185,6 +172,25 @@ Feature: API regression tests
         When sending json search query "sy"
         Then exactly 0 results are returned
 
+    Scenario: trac #5274
+        When sending json search query "Goedestraat 41-BS, Utrecht" with address
+        Then result addresses contain
+          | house_number | road        | city
+          | 41-BS        | Goedestraat | Utrecht
+
+    @poldi-only
+    Scenario Outline: github #36
+        When sending json search query "<query>" with address
+        Then result addresses contain
+         | ID | road     | city
+         | 0  | Seegasse | Wieselburg-Land
+
+    Examples:
+         | query
+         | Seegasse, Gemeinde Wieselburg-Land
+         | Seegasse, Wieselburg-Land
+         | Seegasse, Wieselburg
+
     Scenario: github #190
         When looking up place N257363453
         Then the results contain