mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
do not use index when searching in large areas
This concerns viewboxes as well as radius search.
This commit is contained in:
@@ -253,6 +253,8 @@ class _TokenSequence:
|
||||
priors = sum(1 for t in self.seq[hnrpos+1:] if t.ttype == qmod.TokenType.PARTIAL)
|
||||
if not self._adapt_penalty_from_priors(priors, 1):
|
||||
return False
|
||||
if any(t.ttype == qmod.TokenType.CATEGORY for t in self.seq):
|
||||
self.penalty += 1.0
|
||||
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user