diff options
author | Yuri Gorshenin <y@maps.me> | 2016-09-12 17:03:20 +0300 |
---|---|---|
committer | Yuri Gorshenin <y@maps.me> | 2016-09-12 17:09:24 +0300 |
commit | 96682f747663b5c3d1d8166c0f5ef340d8e8211f (patch) | |
tree | e4d4921ddf844f0140b5c2382a46c691d36779c1 /search/ranker.hpp | |
parent | 16a2be0f43ec3b330ea33f119a7a7b8e2c50e37b (diff) |
[search] Fixed (and accelerated) coords search.
Diffstat (limited to 'search/ranker.hpp')
-rw-r--r-- | search/ranker.hpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/search/ranker.hpp b/search/ranker.hpp index ec3abbdd2b..0792b7ff83 100644 --- a/search/ranker.hpp +++ b/search/ranker.hpp @@ -34,6 +34,7 @@ class CountryInfoGetter; namespace search { +class Emitter; class PreResult2Maker; class Ranker @@ -62,12 +63,11 @@ public: TLocales m_categoryLocales; size_t m_limit = 0; - SearchParams::TOnResults m_onResults; }; static size_t const kBatchSize; - Ranker(Index const & index, storage::CountryInfoGetter const & infoGetter, + Ranker(Index const & index, Emitter & emitter, storage::CountryInfoGetter const & infoGetter, CategoriesHolder const & categories, vector<Suggest> const & suggests, my::Cancellable const & cancellable); virtual ~Ranker() = default; @@ -83,17 +83,14 @@ public: void MakeResultHighlight(Result & res) const; void GetSuggestion(string const & name, string & suggest) const; - void SuggestStrings(Results & res); - void MatchForSuggestions(strings::UniString const & token, int8_t locale, string const & prolog, - Results & res); + void SuggestStrings(); + void MatchForSuggestions(strings::UniString const & token, int8_t locale, string const & prolog); void GetBestMatchName(FeatureType const & f, string & name) const; - void ProcessSuggestions(vector<IndexedValue> & vec, Results & res) const; + void ProcessSuggestions(vector<IndexedValue> & vec) const; virtual void SetPreResults1(vector<PreResult1> && preResults1) { m_preResults1 = move(preResults1); } virtual void UpdateResults(bool lastUpdate); - inline Results & GetResults() { return m_results; } - void ClearCaches(); inline void SetLocalityFinderLanguage(int8_t code) { m_locality.SetLanguage(code); } @@ -133,12 +130,12 @@ private: mutable LocalityFinder m_locality; Index const & m_index; + Emitter & m_emitter; storage::CountryInfoGetter const & m_infoGetter; CategoriesHolder const & m_categories; vector<Suggest> const & m_suggests; vector<PreResult1> m_preResults1; vector<IndexedValue> m_tentativeResults; - Results m_results; }; } // namespace search |