mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-25 05:52:32 +03:00
allow search for partials consisting of 3 or more words
The search query builder currently rejects searches for partial names only, when the partial terms are all very frequent to avoid queries that return too many results. This change slightly relaxes the condition to allow the search when there are 3 or more partial terms. With so many terms the number of matches should be managable.
This commit is contained in:
parent
b593fe9c3e
commit
9e4e913bf7
@ -264,6 +264,8 @@ class SearchDescription
|
||||
{
|
||||
if (empty($this->aName)) {
|
||||
$this->bNameNeedsAddress = $bNeedsAddress;
|
||||
} elseif ($bSearchable && count($this->aName) >= 2) {
|
||||
$this->bNameNeedsAddress = false;
|
||||
} else {
|
||||
$this->bNameNeedsAddress &= $bNeedsAddress;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user