forked from organicmaps/organicmaps
[search] Don't match categories against empty prefix.
This commit is contained in:
parent
cb92f6b644
commit
2e1005f3b2
1 changed files with 3 additions and 1 deletions
|
@ -116,8 +116,10 @@ void Query::Search(function<void (Result const &)> const & f)
|
|||
}
|
||||
|
||||
// Category matching.
|
||||
if (!m_prefix.empty())
|
||||
{
|
||||
KeywordMatcher matcher = MakeMatcher(m_keywords, m_prefix);
|
||||
KeywordMatcher matcher = MakeMatcher(vector<strings::UniString>(), m_prefix);
|
||||
LOG(LINFO, (m_prefix));
|
||||
matcher.ProcessNameToken("", strings::MakeUniString("restaurant"));
|
||||
uint32_t const matchScore = matcher.GetMatchScore();
|
||||
if (matcher.GetPrefixMatchScore() <= GetMaxPrefixMatchScore(m_prefix.size()) &&
|
||||
|
|
Loading…
Add table
Reference in a new issue