{"action":"created","comment":{"url":"https://api.github.com/repos/openfun/richie/pulls/comments/207400562","pull_request_review_id":143007789,"id":207400562,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzQwMDU2Mg==","diff_hunk":"@@ -46,6 +49,36 @@ class CoursesIndexer:\n         },\n     }\n \n+    scripts = {\n+        # The ordering process first splits the courses into four groups, with further ordering\n+        # inside each one of those groups.\n+        \"sort_list\": {","path":"src/richie/apps/search/indexers/courses.py","position":20,"original_position":20,"commit_id":"90c8d4af3c959f0b4e8c3965aafb6856334ac729","original_commit_id":"90c8d4af3c959f0b4e8c3965aafb6856334ac729","user":{"login":"mbenadda","id":1932937,"node_id":"MDQ6VXNlcjE5MzI5Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1932937?v=4","gravatar_id":"","url":"https://api.github.com/users/mbenadda","html_url":"https://github.com/mbenadda","followers_url":"https://api.github.com/users/mbenadda/followers","following_url":"https://api.github.com/users/mbenadda/following{/other_user}","gists_url":"https://api.github.com/users/mbenadda/gists{/gist_id}","starred_url":"https://api.github.com/users/mbenadda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbenadda/subscriptions","organizations_url":"https://api.github.com/users/mbenadda/orgs","repos_url":"https://api.github.com/users/mbenadda/repos","events_url":"https://api.github.com/users/mbenadda/events{/privacy}","received_events_url":"https://api.github.com/users/mbenadda/received_events","type":"User","site_admin":false},"body":"I added a graph sorta like yours","created_at":"2018-08-02T23:05:28Z","updated_at":"2018-08-02T23:05:28Z","html_url":"https://github.com/openfun/richie/pull/328#discussion_r207400562","pull_request_url":"https://api.github.com/repos/openfun/richie/pulls/328","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openfun/richie/pulls/comments/207400562"},"html":{"href":"https://github.com/openfun/richie/pull/328#discussion_r207400562"},"pull_request":{"href":"https://api.github.com/repos/openfun/richie/pulls/328"}},"in_reply_to_id":207255832},"pull_request":{"url":"https://api.github.com/repos/openfun/richie/pulls/328","id":205743731,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NzQzNzMx","html_url":"https://github.com/openfun/richie/pull/328","diff_url":"https://github.com/openfun/richie/pull/328.diff","patch_url":"https://github.com/openfun/richie/pull/328.patch","issue_url":"https://api.github.com/repos/openfun/richie/issues/328","number":328,"state":"open","locked":false,"title":"Sort courses list results","user":{"login":"mbenadda","id":1932937,"node_id":"MDQ6VXNlcjE5MzI5Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1932937?v=4","gravatar_id":"","url":"https://api.github.com/users/mbenadda","html_url":"https://github.com/mbenadda","followers_url":"https://api.github.com/users/mbenadda/followers","following_url":"https://api.github.com/users/mbenadda/following{/other_user}","gists_url":"https://api.github.com/users/mbenadda/gists{/gist_id}","starred_url":"https://api.github.com/users/mbenadda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbenadda/subscriptions","organizations_url":"https://api.github.com/users/mbenadda/orgs","repos_url":"https://api.github.com/users/mbenadda/repos","events_url":"https://api.github.com/users/mbenadda/events{/privacy}","received_events_url":"https://api.github.com/users/mbenadda/received_events","type":"User","site_admin":false},"body":"## Purpose\r\n\r\nImplement sorting logic for courses list search results. The business logic lives on the `CoursesIndexer` to it's easy to override.\r\n\r\n## Proposal\r\n\r\nDescription...\r\n\r\n- [x] Write our lucene expression sorting script\r\n- [x] Call it with the relevant params in the courses ViewSet through `get_courses_list_sorting_script`\r\n- [x] Rework the `regenerate_indexes` management command to generically store the scripts defined on the indexers","created_at":"2018-08-02T13:56:28Z","updated_at":"2018-08-02T23:05:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e920a47c3af73774142958bb74aa87190a5c2db","assignee":{"login":"mbenadda","id":1932937,"node_id":"MDQ6VXNlcjE5MzI5Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1932937?v=4","gravatar_id":"","url":"https://api.github.com/users/mbenadda","html_url":"https://github.com/mbenadda","followers_url":"https://api.github.com/users/mbenadda/followers","following_url":"https://api.github.com/users/mbenadda/following{/other_user}","gists_url":"https://api.github.com/users/mbenadda/gists{/gist_id}","starred_url":"https://api.github.com/users/mbenadda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbenadda/subscriptions","organizations_url":"https://api.github.com/users/mbenadda/orgs","repos_url":"https://api.github.com/users/mbenadda/repos","events_url":"https://api.github.com/users/mbenadda/events{/privacy}","received_events_url":"https://api.github.com/users/mbenadda/received_events","type":"User","site_admin":false},"assignees":[{"login":"mbenadda","id":1932937,"node_id":"MDQ6VXNlcjE5MzI5Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1932937?v=4","gravatar_id":"","url":"https://api.github.com/users/mbenadda","html_url":"https://github.com/mbenadda","followers_url":"https://api.github.com/users/mbenadda/followers","following_url":"https://api.github.com/users/mbenadda/following{/other_user}","gists_url":"https://api.github.com/users/mbenadda/gists{/gist_id}","starred_url":"https://api.github.com/users/mbenadda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbenadda/subscriptions","organizations_url":"https://api.github.com/users/mbenadda/orgs","repos_url":"https://api.github.com/users/mbenadda/repos","events_url":"https://api.github.com/users/mbenadda/events{/privacy}","received_events_url":"https://api.github.com/users/mbenadda/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"rmoch","id":89626,"node_id":"MDQ6VXNlcjg5NjI2","avatar_url":"https://avatars0.githubusercontent.com/u/89626?v=4","gravatar_id":"","url":"https://api.github.com/users/rmoch","html_url":"https://github.com/rmoch","followers_url":"https://api.github.com/users/rmoch/followers","following_url":"https://api.github.com/users/rmoch/following{/other_user}","gists_url":"https://api.github.com/users/rmoch/gists{/gist_id}","starred_url":"https://api.github.com/users/rmoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmoch/subscriptions","organizations_url":"https://api.github.com/users/rmoch/orgs","repos_url":"https://api.github.com/users/rmoch/repos","events_url":"https://api.github.com/users/rmoch/events{/privacy}","received_events_url":"https://api.github.com/users/rmoch/received_events","type":"User","site_admin":false},{"login":"jmaupetit","id":956157,"node_id":"MDQ6VXNlcjk1NjE1Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/956157?v=4","gravatar_id":"","url":"https://api.github.com/users/jmaupetit","html_url":"https://github.com/jmaupetit","followers_url":"https://api.github.com/users/jmaupetit/followers","following_url":"https://api.github.com/users/jmaupetit/following{/other_user}","gists_url":"https://api.github.com/users/jmaupetit/gists{/gist_id}","starred_url":"https://api.github.com/users/jmaupetit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmaupetit/subscriptions","organizations_url":"https://api.github.com/users/jmaupetit/orgs","repos_url":"https://api.github.com/users/jmaupetit/repos","events_url":"https://api.github.com/users/jmaupetit/events{/privacy}","received_events_url":"https://api.github.com/users/jmaupetit/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":915983271,"node_id":"MDU6TGFiZWw5MTU5ODMyNzE=","url":"https://api.github.com/repos/openfun/richie/labels/feature","name":"feature","color":"0052cc","default":false},{"id":915983269,"node_id":"MDU6TGFiZWw5MTU5ODMyNjk=","url":"https://api.github.com/repos/openfun/richie/labels/needs%20review","name":"needs review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openfun/richie/pulls/328/commits","review_comments_url":"https://api.github.com/repos/openfun/richie/pulls/328/comments","review_comment_url":"https://api.github.com/repos/openfun/richie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openfun/richie/issues/328/comments","statuses_url":"https://api.github.com/repos/openfun/richie/statuses/90c8d4af3c959f0b4e8c3965aafb6856334ac729","head":{"label":"openfun:sort-courses-list-results","ref":"sort-courses-list-results","sha":"90c8d4af3c959f0b4e8c3965aafb6856334ac729","user":{"login":"openfun","id":7224891,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMjQ4OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/7224891?v=4","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"repo":{"id":111388461,"node_id":"MDEwOlJlcG9zaXRvcnkxMTEzODg0NjE=","name":"richie","full_name":"openfun/richie","owner":{"login":"openfun","id":7224891,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMjQ4OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/7224891?v=4","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfun/richie","description":"🐬 A FUN portal for Open edX","fork":false,"url":"https://api.github.com/repos/openfun/richie","forks_url":"https://api.github.com/repos/openfun/richie/forks","keys_url":"https://api.github.com/repos/openfun/richie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfun/richie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfun/richie/teams","hooks_url":"https://api.github.com/repos/openfun/richie/hooks","issue_events_url":"https://api.github.com/repos/openfun/richie/issues/events{/number}","events_url":"https://api.github.com/repos/openfun/richie/events","assignees_url":"https://api.github.com/repos/openfun/richie/assignees{/user}","branches_url":"https://api.github.com/repos/openfun/richie/branches{/branch}","tags_url":"https://api.github.com/repos/openfun/richie/tags","blobs_url":"https://api.github.com/repos/openfun/richie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfun/richie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfun/richie/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfun/richie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfun/richie/statuses/{sha}","languages_url":"https://api.github.com/repos/openfun/richie/languages","stargazers_url":"https://api.github.com/repos/openfun/richie/stargazers","contributors_url":"https://api.github.com/repos/openfun/richie/contributors","subscribers_url":"https://api.github.com/repos/openfun/richie/subscribers","subscription_url":"https://api.github.com/repos/openfun/richie/subscription","commits_url":"https://api.github.com/repos/openfun/richie/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfun/richie/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfun/richie/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfun/richie/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfun/richie/contents/{+path}","compare_url":"https://api.github.com/repos/openfun/richie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfun/richie/merges","archive_url":"https://api.github.com/repos/openfun/richie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfun/richie/downloads","issues_url":"https://api.github.com/repos/openfun/richie/issues{/number}","pulls_url":"https://api.github.com/repos/openfun/richie/pulls{/number}","milestones_url":"https://api.github.com/repos/openfun/richie/milestones{/number}","notifications_url":"https://api.github.com/repos/openfun/richie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfun/richie/labels{/name}","releases_url":"https://api.github.com/repos/openfun/richie/releases{/id}","deployments_url":"https://api.github.com/repos/openfun/richie/deployments","created_at":"2017-11-20T09:23:40Z","updated_at":"2018-08-02T12:51:04Z","pushed_at":"2018-08-02T13:56:29Z","git_url":"git://github.com/openfun/richie.git","ssh_url":"git@github.com:openfun/richie.git","clone_url":"https://github.com/openfun/richie.git","svn_url":"https://github.com/openfun/richie","homepage":"","size":2589,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":27,"watchers":11,"default_branch":"master"}},"base":{"label":"openfun:master","ref":"master","sha":"4918f88bde059d807c7316671d4e92282ec865dc","user":{"login":"openfun","id":7224891,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMjQ4OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/7224891?v=4","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"repo":{"id":111388461,"node_id":"MDEwOlJlcG9zaXRvcnkxMTEzODg0NjE=","name":"richie","full_name":"openfun/richie","owner":{"login":"openfun","id":7224891,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyMjQ4OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/7224891?v=4","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfun/richie","description":"🐬 A FUN portal for Open edX","fork":false,"url":"https://api.github.com/repos/openfun/richie","forks_url":"https://api.github.com/repos/openfun/richie/forks","keys_url":"https://api.github.com/repos/openfun/richie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfun/richie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfun/richie/teams","hooks_url":"https://api.github.com/repos/openfun/richie/hooks","issue_events_url":"https://api.github.com/repos/openfun/richie/issues/events{/number}","events_url":"https://api.github.com/repos/openfun/richie/events","assignees_url":"https://api.github.com/repos/openfun/richie/assignees{/user}","branches_url":"https://api.github.com/repos/openfun/richie/branches{/branch}","tags_url":"https://api.github.com/repos/openfun/richie/tags","blobs_url":"https://api.github.com/repos/openfun/richie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfun/richie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfun/richie/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfun/richie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfun/richie/statuses/{sha}","languages_url":"https://api.github.com/repos/openfun/richie/languages","stargazers_url":"https://api.github.com/repos/openfun/richie/stargazers","contributors_url":"https://api.github.com/repos/openfun/richie/contributors","subscribers_url":"https://api.github.com/repos/openfun/richie/subscribers","subscription_url":"https://api.github.com/repos/openfun/richie/subscription","commits_url":"https://api.github.com/repos/openfun/richie/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfun/richie/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfun/richie/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfun/richie/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfun/richie/contents/{+path}","compare_url":"https://api.github.com/repos/openfun/richie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfun/richie/merges","archive_url":"https://api.github.com/repos/openfun/richie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfun/richie/downloads","issues_url":"https://api.github.com/repos/openfun/richie/issues{/number}","pulls_url":"https://api.github.com/repos/openfun/richie/pulls{/number}","milestones_url":"https://api.github.com/repos/openfun/richie/milestones{/number}","notifications_url":"https://api.github.com/repos/openfun/richie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfun/richie/labels{/name}","releases_url":"https://api.github.com/repos/openfun/richie/releases{/id}","deployments_url":"https://api.github.com/repos/openfun/richie/deployments","created_at":"2017-11-20T09:23:40Z","updated_at":"2018-08-02T12:51:04Z","pushed_at":"2018-08-02T13:56:29Z","git_url":"git://github.com/openfun/richie.git","ssh_url":"git@github.com:openfun/richie.git","clone_url":"https://github.com/openfun/richie.git","svn_url":"https://github.com/openfun/richie","homepage":"","size":2589,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":27,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfun/richie/pulls/328"},"html":{"href":"https://github.com/openfun/richie/pull/328"},"issue":{"href":"https://api.github.com/repos/openfun/richie/issues/328"},"comments":{"href":"https://api.github.com/repos/openfun/richie/issues/328/comments"},"review_comments":{"href":"https://api.github.com/repos/openfun/richie/pulls/328/comments"},"review_comment":{"href":"https://api.github.com/repos/openfun/richie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openfun/richie/pulls/328/commits"},"statuses":{"href":"https://api.github.com/repos/openfun/richie/statuses/90c8d4af3c959f0b4e8c3965aafb6856334ac729"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mbenadda"}}