]> 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, 20 Sep 2023 12:52:05 +0000 (14:52 +0200)
commitfd26310d6adc5fc5685bdd0de36afa66e85b9c9c
treeb8760e064e863f921df9d9d26eb01e8f61f43e33
parent5762a5bc80bdb679a23f500aeb428b431f0774f9
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