]> git.openstreetmap.org Git - nominatim.git/commitdiff
fix combination of NeedsAddress flag
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 5 Nov 2021 21:18:37 +0000 (22:18 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 5 Nov 2021 21:18:37 +0000 (22:18 +0100)
When dealing with multiple partial terms, only keep the
flag, when all partial terms are so frequent as to need
an address.

Fixes #2510.

lib-php/SearchDescription.php

index fcb87d433a606a114f9ae27f2dbcde1989cb34df..e13a0e9daccd2b511b8c0dcb3664e05776643e44 100644 (file)
@@ -257,7 +257,7 @@ class SearchDescription
         if (empty($this->aName)) {
             $this->bNameNeedsAddress = $bNeedsAddress;
         } else {
         if (empty($this->aName)) {
             $this->bNameNeedsAddress = $bNeedsAddress;
         } else {
-            $this->bNameNeedsAddress |= $bNeedsAddress;
+            $this->bNameNeedsAddress &= $bNeedsAddress;
         }
         if ($bSearchable) {
             $this->aName[$iId] = $iId;
         }
         if ($bSearchable) {
             $this->aName[$iId] = $iId;