{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/179720859","pull_request_review_id":110018668,"id":179720859,"diff_hunk":"@@ -217,7 +222,23 @@ unique_ptr<RankTable> LoadRankTable(unique_ptr<TRegion> && region)\n // Calculates search rank for a feature.\n uint8_t CalcSearchRank(FeatureType const & ft)\n {\n-  return feature::PopulationToRank(ftypes::GetPopulation(ft));\n+  uint8_t eventRank = 0;\n+  Classificator const & c = classif();\n+  auto const types = feature::TypesHolder(ft);\n+  auto const fcType =\n+      ftypes::BaseChecker::PrepareToMatch(c.GetTypeByPath({\"event\", \"fc2018\"}), 2 /* level */);\n+  auto const fcCityType =\n+      ftypes::BaseChecker::PrepareToMatch(c.GetTypeByPath({\"event\", \"fc2018_city\"}), 2 /* level */);\n+  if (find(types.begin(), types.end(), fcType) != types.end() ||\n+      find(types.begin(), types.end(), fcCityType) != types.end())\n+  {\n+    eventRank = 16;  // todo(@t.yan): test and adjust.\n+  }\n+\n+  auto const populationRank = feature::PopulationToRank(ftypes::GetPopulation(ft));\n+\n+  return static_cast<uint8_t>(min(static_cast<int>(numeric_limits<uint8_t>::max()),","path":"indexer/rank_table.cpp","position":null,"original_position":45,"commit_id":"5343ef44a6c748cc0ae5ea536dfb469ad25c71b9","original_commit_id":"639d743566eb6a4223838c39359a366bed01ef16","user":{"login":"tatiana-yan","id":9213190,"avatar_url":"https://avatars3.githubusercontent.com/u/9213190?v=4","gravatar_id":"","url":"https://api.github.com/users/tatiana-yan","html_url":"https://github.com/tatiana-yan","followers_url":"https://api.github.com/users/tatiana-yan/followers","following_url":"https://api.github.com/users/tatiana-yan/following{/other_user}","gists_url":"https://api.github.com/users/tatiana-yan/gists{/gist_id}","starred_url":"https://api.github.com/users/tatiana-yan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatiana-yan/subscriptions","organizations_url":"https://api.github.com/users/tatiana-yan/orgs","repos_url":"https://api.github.com/users/tatiana-yan/repos","events_url":"https://api.github.com/users/tatiana-yan/events{/privacy}","received_events_url":"https://api.github.com/users/tatiana-yan/received_events","type":"User","site_admin":false},"body":"done","created_at":"2018-04-06T10:41:17Z","updated_at":"2018-04-06T10:41:18Z","html_url":"https://github.com/mapsme/omim/pull/8452#discussion_r179720859","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/8452","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/179720859"},"html":{"href":"https://github.com/mapsme/omim/pull/8452#discussion_r179720859"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/8452"}},"in_reply_to_id":179711056},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/8452","id":179902575,"html_url":"https://github.com/mapsme/omim/pull/8452","diff_url":"https://github.com/mapsme/omim/pull/8452.diff","patch_url":"https://github.com/mapsme/omim/pull/8452.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/8452","number":8452,"state":"open","locked":false,"title":"[search] Increase search rank for FC2018 objects","user":{"login":"tatiana-yan","id":9213190,"avatar_url":"https://avatars3.githubusercontent.com/u/9213190?v=4","gravatar_id":"","url":"https://api.github.com/users/tatiana-yan","html_url":"https://github.com/tatiana-yan","followers_url":"https://api.github.com/users/tatiana-yan/followers","following_url":"https://api.github.com/users/tatiana-yan/following{/other_user}","gists_url":"https://api.github.com/users/tatiana-yan/gists{/gist_id}","starred_url":"https://api.github.com/users/tatiana-yan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatiana-yan/subscriptions","organizations_url":"https://api.github.com/users/tatiana-yan/orgs","repos_url":"https://api.github.com/users/tatiana-yan/repos","events_url":"https://api.github.com/users/tatiana-yan/events{/privacy}","received_events_url":"https://api.github.com/users/tatiana-yan/received_events","type":"User","site_admin":false},"body":"Ранк для фифашных объектов подобран из следующих соображений:\r\n1. Если ищется что-то типа \"стадион\" и во вьюпорте есть город где проходит ЧМ, то на первом месте должны быть стадионы ЧМ. \r\n2. Если вьюпорт вообще не рядом , то стадионы ЧМ не должны вылезать.\r\n3. Поднять стадион при поиске по названию стадиона на первое место среди одноименных отелей, остановок и т.п.\r\n\r\nНапример, если на карте любой кусок москвы, то по запросу \"стадион\" топ-2 это лужники и спартак. Если на карте Минск, то по запросу \"стадион\" никаких объектов ЧМ вылезать не должно, должны быть стадионы в минске. Если ищем \"казань арена\", то среди кучи объектов типа \"апартаменты с видом на казань арена\" стадион должен быть первым.\r\n\r\ntodo уберу после тестов по полным данным (надеюсь что сегодня).","created_at":"2018-04-06T09:52:23Z","updated_at":"2018-04-06T10:41:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f5e37ad3d92c51798578376b60b9f0a276cb72b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/8452/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/8452/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/8452/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/5343ef44a6c748cc0ae5ea536dfb469ad25c71b9","head":{"label":"tatiana-yan:fc18_search_rank","ref":"fc18_search_rank","sha":"5343ef44a6c748cc0ae5ea536dfb469ad25c71b9","user":{"login":"tatiana-yan","id":9213190,"avatar_url":"https://avatars3.githubusercontent.com/u/9213190?v=4","gravatar_id":"","url":"https://api.github.com/users/tatiana-yan","html_url":"https://github.com/tatiana-yan","followers_url":"https://api.github.com/users/tatiana-yan/followers","following_url":"https://api.github.com/users/tatiana-yan/following{/other_user}","gists_url":"https://api.github.com/users/tatiana-yan/gists{/gist_id}","starred_url":"https://api.github.com/users/tatiana-yan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatiana-yan/subscriptions","organizations_url":"https://api.github.com/users/tatiana-yan/orgs","repos_url":"https://api.github.com/users/tatiana-yan/repos","events_url":"https://api.github.com/users/tatiana-yan/events{/privacy}","received_events_url":"https://api.github.com/users/tatiana-yan/received_events","type":"User","site_admin":false},"repo":{"id":98180090,"name":"omim","full_name":"tatiana-yan/omim","owner":{"login":"tatiana-yan","id":9213190,"avatar_url":"https://avatars3.githubusercontent.com/u/9213190?v=4","gravatar_id":"","url":"https://api.github.com/users/tatiana-yan","html_url":"https://github.com/tatiana-yan","followers_url":"https://api.github.com/users/tatiana-yan/followers","following_url":"https://api.github.com/users/tatiana-yan/following{/other_user}","gists_url":"https://api.github.com/users/tatiana-yan/gists{/gist_id}","starred_url":"https://api.github.com/users/tatiana-yan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatiana-yan/subscriptions","organizations_url":"https://api.github.com/users/tatiana-yan/orgs","repos_url":"https://api.github.com/users/tatiana-yan/repos","events_url":"https://api.github.com/users/tatiana-yan/events{/privacy}","received_events_url":"https://api.github.com/users/tatiana-yan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tatiana-yan/omim","description":"🗺️ MAPS.ME — Offline OpenStreetMap maps for iOS and Android","fork":true,"url":"https://api.github.com/repos/tatiana-yan/omim","forks_url":"https://api.github.com/repos/tatiana-yan/omim/forks","keys_url":"https://api.github.com/repos/tatiana-yan/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tatiana-yan/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tatiana-yan/omim/teams","hooks_url":"https://api.github.com/repos/tatiana-yan/omim/hooks","issue_events_url":"https://api.github.com/repos/tatiana-yan/omim/issues/events{/number}","events_url":"https://api.github.com/repos/tatiana-yan/omim/events","assignees_url":"https://api.github.com/repos/tatiana-yan/omim/assignees{/user}","branches_url":"https://api.github.com/repos/tatiana-yan/omim/branches{/branch}","tags_url":"https://api.github.com/repos/tatiana-yan/omim/tags","blobs_url":"https://api.github.com/repos/tatiana-yan/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tatiana-yan/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tatiana-yan/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/tatiana-yan/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tatiana-yan/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/tatiana-yan/omim/languages","stargazers_url":"https://api.github.com/repos/tatiana-yan/omim/stargazers","contributors_url":"https://api.github.com/repos/tatiana-yan/omim/contributors","subscribers_url":"https://api.github.com/repos/tatiana-yan/omim/subscribers","subscription_url":"https://api.github.com/repos/tatiana-yan/omim/subscription","commits_url":"https://api.github.com/repos/tatiana-yan/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/tatiana-yan/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/tatiana-yan/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/tatiana-yan/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/tatiana-yan/omim/contents/{+path}","compare_url":"https://api.github.com/repos/tatiana-yan/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tatiana-yan/omim/merges","archive_url":"https://api.github.com/repos/tatiana-yan/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tatiana-yan/omim/downloads","issues_url":"https://api.github.com/repos/tatiana-yan/omim/issues{/number}","pulls_url":"https://api.github.com/repos/tatiana-yan/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/tatiana-yan/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/tatiana-yan/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tatiana-yan/omim/labels{/name}","releases_url":"https://api.github.com/repos/tatiana-yan/omim/releases{/id}","deployments_url":"https://api.github.com/repos/tatiana-yan/omim/deployments","created_at":"2017-07-24T10:44:21Z","updated_at":"2017-07-24T10:45:30Z","pushed_at":"2018-04-06T10:41:06Z","git_url":"git://github.com/tatiana-yan/omim.git","ssh_url":"git@github.com:tatiana-yan/omim.git","clone_url":"https://github.com/tatiana-yan/omim.git","svn_url":"https://github.com/tatiana-yan/omim","homepage":"","size":3655160,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapsme:master","ref":"master","sha":"7f86f35a6db52461d868fab8242269742e6a0a42","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars1.githubusercontent.com/u/14185141?v=4","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars1.githubusercontent.com/u/14185141?v=4","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"🗺️ MAPS.ME — Offline OpenStreetMap maps for iOS and Android","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","deployments_url":"https://api.github.com/repos/mapsme/omim/deployments","created_at":"2015-09-20T02:57:13Z","updated_at":"2018-04-06T09:00:56Z","pushed_at":"2018-04-06T10:41:08Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":"","size":3694984,"stargazers_count":2634,"watchers_count":2634,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":572,"mirror_url":null,"archived":false,"open_issues_count":668,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":572,"open_issues":668,"watchers":2634,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/8452"},"html":{"href":"https://github.com/mapsme/omim/pull/8452"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/8452"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/8452/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/8452/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/8452/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/5343ef44a6c748cc0ae5ea536dfb469ad25c71b9"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"tatiana-yan"}}