diff --git a/indexer/search_index_values.hpp b/indexer/search_index_values.hpp index ea8c85d985..c33ae674a7 100644 --- a/indexer/search_index_values.hpp +++ b/indexer/search_index_values.hpp @@ -10,6 +10,7 @@ #include "platform/mwm_version.hpp" #include "base/assert.hpp" +#include "base/logging.hpp" #include "std/algorithm.hpp" #include "std/unique_ptr.hpp" @@ -320,6 +321,7 @@ public: } else { + LOG(LWARNING, ("Unknown search index format.")); m_format = SearchIndexFormat::Unknown; } } diff --git a/search/retrieval.cpp b/search/retrieval.cpp index 536f96c978..8049fa5956 100644 --- a/search/retrieval.cpp +++ b/search/retrieval.cpp @@ -103,13 +103,7 @@ unique_ptr RetrieveAddressFeatures(MwmSet::MwmHandl auto * value = handle.GetValue(); ASSERT(value, ()); - version::MwmVersion version; - if (!version::ReadVersion(value->m_cont, version)) - { - LOG(LERROR, ("Unreadable mwm version.")); - return unique_ptr(); - } - MwmTraits mwmTraits(version.format); + MwmTraits mwmTraits(value->GetMwmVersion().format); if (mwmTraits.GetSearchIndexFormat() == MwmTraits::SearchIndexFormat::FeaturesWithRankAndCenter) @@ -123,11 +117,7 @@ unique_ptr RetrieveAddressFeatures(MwmSet::MwmHandl using TValue = FeatureIndexValue; return RetrieveAddressFeaturesImpl(handle, cancellable, params); } - else - { - LOG(LERROR, ("Unsupported search index format.")); - return unique_ptr(); - } + return unique_ptr(); } // Retrieves from the geometry index corresponding to handle all diff --git a/search/search_query.cpp b/search/search_query.cpp index 5078b0538e..5c89e3484b 100644 --- a/search/search_query.cpp +++ b/search/search_query.cpp @@ -1680,10 +1680,6 @@ void Query::SearchLocality(MwmValue const * pMwm, Locality & res1, Region & res2 using TValue = FeatureIndexValue; SearchLocalityImpl(this, pMwm, res1, res2, params, codingParams); } - else if (mwmTraits.GetSearchIndexFormat() == MwmTraits::SearchIndexFormat::Unknown) - { - LOG(LERROR, ("Unsupported search index format.")); - } } void Query::SearchFeatures()