]> git.openstreetmap.org Git - nominatim.git/commit
rerank results by query
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 19 Sep 2023 14:18:09 +0000 (16:18 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 4 Oct 2023 12:58:14 +0000 (14:58 +0200)
commit10ac54b0003341910fa4040f223e0e1f5377bbbd
treeb8760e064e863f921df9d9d26eb01e8f61f43e33
parentdfde14255a151919afd78fde3217affc34f66557
rerank results by query

The algorithm is similar to the PHP reranking and uses the terms from
the display name to check against the query terms. However instead of
exact matching it uses a per-word-edit-distance, so that it is less
strict when it comes to mismatching accents or other one letter
differences.

Country names get a higher penalty because they don't receive a
penalty during token matching right now.

This will work badly with the legacy tokenizer. Given that it is
marked for removal, it is simply not worth optimising for it.
nominatim/api/search/geocoder.py
nominatim/api/search/legacy_tokenizer.py
nominatim/api/search/query_analyzer_factory.py