diff options
author | vng <viktor.govako@gmail.com> | 2012-03-05 01:11:19 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:36:22 +0300 |
commit | 5fe11e0b5ef6b8884e4bfa01e037d1acca735143 (patch) | |
tree | 0e918dc00386b3abc312d62ee33ef3af9f0901da /indexer | |
parent | d57815a04db47969278ad2731f48bf5e68c61963 (diff) |
[search] Use spaces in synonyms. Do map whole synonym string and separate tokens.
Fix.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/categories_holder.cpp | 2 | ||||
-rw-r--r-- | indexer/search_delimiters.cpp | 10 | ||||
-rw-r--r-- | indexer/search_delimiters.hpp | 6 |
3 files changed, 1 insertions, 17 deletions
diff --git a/indexer/categories_holder.cpp b/indexer/categories_holder.cpp index f62746931e..69fa7670ef 100644 --- a/indexer/categories_holder.cpp +++ b/indexer/categories_holder.cpp @@ -45,7 +45,7 @@ void CategoriesHolder::AddCategory(Category & cat, vector<uint32_t> & types) StringT const uniName = search::NormalizeAndSimplifyString(p->m_synonyms[i].m_name); vector<StringT> tokens; - SplitUniString(uniName, MakeBackInsertFunctor(tokens), search::CategoryDelimiters()); + SplitUniString(uniName, MakeBackInsertFunctor(tokens), search::Delimiters()); for (size_t j = 0; j < tokens.size(); ++j) for (size_t k = 0; k < types.size(); ++k) diff --git a/indexer/search_delimiters.cpp b/indexer/search_delimiters.cpp index b4eb379016..237942dc5b 100644 --- a/indexer/search_delimiters.cpp +++ b/indexer/search_delimiters.cpp @@ -60,14 +60,4 @@ bool Delimiters::operator()(strings::UniChar c) const return false; } -bool CategoryDelimiters::operator()(strings::UniChar c) const -{ - // In categories.txt we use '-' as a delimeter. - // Do not skip this. - if (c == '-') - return false; - - return Delimiters::operator()(c); -} - } diff --git a/indexer/search_delimiters.hpp b/indexer/search_delimiters.hpp index 95f77eaa25..5153b53bc5 100644 --- a/indexer/search_delimiters.hpp +++ b/indexer/search_delimiters.hpp @@ -9,10 +9,4 @@ namespace search public: bool operator()(strings::UniChar c) const; }; - - class CategoryDelimiters : public Delimiters - { - public: - bool operator()(strings::UniChar c) const; - }; } |