mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 10:57:58 +00:00
reduce influence of viewbox
Perfectly matching city names should still get priority.
This commit is contained in:
@@ -133,7 +133,7 @@ class TestNameOnlySearches:
|
||||
@pytest.mark.parametrize('viewbox', ['5.0,4.0,6.0,5.0', '5.7,4.0,6.0,5.0'])
|
||||
def test_prefer_viewbox(self, apiobj, viewbox):
|
||||
lookup = FieldLookup('name_vector', [1, 2], 'lookup_all')
|
||||
ranking = FieldRanking('name_vector', 0.9, [RankedTokens(0.0, [21])])
|
||||
ranking = FieldRanking('name_vector', 0.2, [RankedTokens(0.0, [21])])
|
||||
|
||||
results = run_search(apiobj, 0.1, [lookup], [ranking])
|
||||
assert [r.place_id for r in results] == [101, 100]
|
||||
|
||||
Reference in New Issue
Block a user