Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Pimenov <m@maps.me>2017-02-01 19:14:01 +0300
committerMaxim Pimenov <m@maps.me>2017-02-13 19:10:37 +0300
commit8808823db18c6dcd4842681f0b5765361e337a93 (patch)
treec0b09c4dcb4322214baf41c1236efabc11570532 /indexer/categories_holder.hpp
parent05b55c1b6aa0d708ef826f9ade4cb4ae6f86954b (diff)
[search] Fuzzy search by category.
Diffstat (limited to 'indexer/categories_holder.hpp')
-rw-r--r--indexer/categories_holder.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indexer/categories_holder.hpp b/indexer/categories_holder.hpp
index ba40e43460..b40982e001 100644
--- a/indexer/categories_holder.hpp
+++ b/indexer/categories_holder.hpp
@@ -125,6 +125,15 @@ public:
/// @returns raw classificator type if it's not localized in categories.txt.
string GetReadableFeatureType(uint32_t type, int8_t locale) const;
+ // Exposes the tries that map category tokens to types.
+ Trie const * GetNameToTypesTrie(int8_t locale) const
+ {
+ auto const it = m_name2type.find(locale);
+ if (it == m_name2type.end())
+ return nullptr;
+ return it->second.get();
+ }
+
bool IsTypeExist(uint32_t type) const;
inline void Swap(CategoriesHolder & r)