]> git.openstreetmap.org Git - nominatim.git/commitdiff
do not mix partial and full name terms
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 11 Mar 2021 19:22:54 +0000 (20:22 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 11 Mar 2021 19:22:54 +0000 (20:22 +0100)
If NameNonSearch already contains a partial term, then a
full term must not be added to the Name list anymore.

lib-php/SearchDescription.php

index 436398cdfb50e80c501365991e039e8e33fb1bdc..8e8e5acbb02dbad958328359d091bf118d6927c3 100644 (file)
@@ -289,7 +289,7 @@ class SearchDescription
                     $oSearch->aAddress[$iWordID] = $iWordID;
                     $aNewSearches[] = $oSearch;
                 }
-            } else {
+            } else if (empty($this->aNameNonSearch)) {
                 $oSearch = clone $this;
                 $oSearch->iSearchRank++;
                 $oSearch->aName = array($iWordID => $iWordID);