From 25ea392ec4fd696767ac7309720ab0b741c365a6 Mon Sep 17 00:00:00 2001 From: vng Date: Wed, 12 Dec 2012 12:44:16 +0300 Subject: [PATCH] Fix small bug in search ("Montana Helena" query). --- search/search_query.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/search/search_query.cpp b/search/search_query.cpp index 26c96451c9..3302af7c7d 100644 --- a/search/search_query.cpp +++ b/search/search_query.cpp @@ -1271,6 +1271,9 @@ namespace impl // splice locality info with region info i->m_matchedTokens.insert(i->m_matchedTokens.end(), p->m_matchedTokens.begin(), p->m_matchedTokens.end()); + // we need to store sorted range of token indexies + sort(i->m_matchedTokens.begin(), i->m_matchedTokens.end()); + i->m_enName = i->m_enName + ", " + p->m_enName; } }