diff options
author | Maxim Pimenov <m@maps.me> | 2016-02-03 17:00:01 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:17:03 +0300 |
commit | 8a1f25a0c8febfa978dcb0b9e899c02f35a8a484 (patch) | |
tree | d577409ebd4f7199114ee8410f84134d64ae04bc | |
parent | ce020308dbb6afc4fae2666f9fbfd8b1def454cf (diff) |
[search] Added more alohalytics stats for search results.
-rw-r--r-- | search/result.cpp | 11 | ||||
-rw-r--r-- | search/result.hpp | 4 | ||||
-rw-r--r-- | search/search_engine.cpp | 2 |
3 files changed, 16 insertions, 1 deletions
diff --git a/search/result.cpp b/search/result.cpp index c6cc6dac85..9e2e97a6ce 100644 --- a/search/result.cpp +++ b/search/result.cpp @@ -346,4 +346,15 @@ string DebugPrint(AddressInfo const & info) return info.FormatNameAndAddress(); } +string DebugPrint(Result const & r) +{ + string s; + s.append(r.GetString()); + s.append("|"); + s.append(r.GetFeatureType()); + s.append("|"); + s.append(r.IsSuggest() ? "1" : "0"); + return s; +} + } // namespace search diff --git a/search/result.hpp b/search/result.hpp index 3ba05f0c1f..285f88d0f1 100644 --- a/search/result.hpp +++ b/search/result.hpp @@ -112,7 +112,7 @@ private: // The position that this result occupied in the vector returned // by a search query. -1 if undefined. - int32_t m_positionInResults; + int32_t m_positionInResults = -1; public: Metadata m_metadata; @@ -208,4 +208,6 @@ struct AddressInfo void Clear(); }; +string DebugPrint(search::Result const &); + } // namespace search diff --git a/search/search_engine.cpp b/search/search_engine.cpp index 9693c9a7de..db5d59c7cc 100644 --- a/search/search_engine.cpp +++ b/search/search_engine.cpp @@ -1,5 +1,6 @@ #include "search_engine.hpp" +#include "categories_holder.hpp" #include "geometry_utils.hpp" #include "search_query.hpp" #include "search_string_utils.hpp" @@ -18,6 +19,7 @@ #include "base/scope_guard.hpp" #include "base/stl_add.hpp" +#include "std/algorithm.hpp" #include "std/bind.hpp" #include "std/map.hpp" #include "std/vector.hpp" |