From aa56153a53fa1d9774f9d6fa9b1fddcfcd1722d8 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 4 Jul 2020 00:53:37 +0200 Subject: [PATCH] Try to fix #9329 --- .../src/main/java/net/osmand/search/core/SearchResult.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/search/core/SearchResult.java b/OsmAnd-java/src/main/java/net/osmand/search/core/SearchResult.java index 578e629989..79d11a3fe0 100644 --- a/OsmAnd-java/src/main/java/net/osmand/search/core/SearchResult.java +++ b/OsmAnd-java/src/main/java/net/osmand/search/core/SearchResult.java @@ -56,7 +56,7 @@ public class SearchResult { public double getSumPhraseMatchWeight() { // if result is a complete match in the search we prioritize it higher boolean match = requiredSearchPhrase.countWords(localeName) <= getSelfWordCount(); - double res = match ? ObjectType.getTypeWeight(objectType) : 0; + double res = ObjectType.getTypeWeight(match ? objectType : null); if (parentSearchResult != null) { res = res + parentSearchResult.getSumPhraseMatchWeight() / MAX_TYPE_WEIGHT; }