Skip to content

Commit

Permalink
Merge pull request #3293 from lonvia/rematch-against-country-code
Browse files Browse the repository at this point in the history
Add country code to words to be rematched
  • Loading branch information
lonvia authored Jan 8, 2024
2 parents d35eb41 + 28f7e51 commit b969c5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nominatim/api/search/geocoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def rerank_by_query(self, query: QueryStruct, results: SearchResults) -> None:
or (result.importance is not None and result.importance < 0):
continue
distance = 0.0
norm = self.query_analyzer.normalize_text(result.display_name)
norm = self.query_analyzer.normalize_text(' '.join((result.display_name,
result.country_code or '')))
words = set((w for w in norm.split(' ') if w))
if not words:
continue
Expand Down

0 comments on commit b969c5a

Please sign in to comment.