{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-notes-api/pulls/comments/30355482","id":30355482,"diff_hunk":"@@ -39,13 +39,28 @@ def build_search_kwargs(self, *args, **kwargs):\n             highlight_options = {\n                 'fields': {\n                     content_field: {'store': 'yes'},\n-                }\n+                    'tags': {'store': 'yes'},\n+                },\n             }\n             if isinstance(highlight, dict):\n                 highlight_options.update(highlight)\n             res['highlight'] = highlight_options\n         return res\n \n+    def _process_results(","path":"notesserver/highlight.py","position":13,"original_position":13,"commit_id":"3ae8f3e2f87906ac12714879aac6b552537217f0","original_commit_id":"ef601db8c543316437cfb09202ec43abe292a2ee","user":{"login":"benmcmorran","id":6981284,"avatar_url":"https://avatars.githubusercontent.com/u/6981284?v=3","gravatar_id":"","url":"https://api.github.com/users/benmcmorran","html_url":"https://github.com/benmcmorran","followers_url":"https://api.github.com/users/benmcmorran/followers","following_url":"https://api.github.com/users/benmcmorran/following{/other_user}","gists_url":"https://api.github.com/users/benmcmorran/gists{/gist_id}","starred_url":"https://api.github.com/users/benmcmorran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmcmorran/subscriptions","organizations_url":"https://api.github.com/users/benmcmorran/orgs","repos_url":"https://api.github.com/users/benmcmorran/repos","events_url":"https://api.github.com/users/benmcmorran/events{/privacy}","received_events_url":"https://api.github.com/users/benmcmorran/received_events","type":"User","site_admin":false},"body":"I'll try that. I wasn't sure about the performance impact of doing highlighting outside of ES, but @dan-f is working on measuring that.","created_at":"2015-05-14T19:45:20Z","updated_at":"2015-05-14T19:45:20Z","html_url":"https://github.com/edx/edx-notes-api/pull/24#discussion_r30355482","pull_request_url":"https://api.github.com/repos/edx/edx-notes-api/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/comments/30355482"},"html":{"href":"https://github.com/edx/edx-notes-api/pull/24#discussion_r30355482"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-notes-api/pulls/24","id":35430967,"html_url":"https://github.com/edx/edx-notes-api/pull/24","diff_url":"https://github.com/edx/edx-notes-api/pull/24.diff","patch_url":"https://github.com/edx/edx-notes-api/pull/24.patch","issue_url":"https://api.github.com/repos/edx/edx-notes-api/issues/24","number":24,"state":"open","locked":false,"title":"Search and highlight tags in student notes","user":{"login":"benmcmorran","id":6981284,"avatar_url":"https://avatars.githubusercontent.com/u/6981284?v=3","gravatar_id":"","url":"https://api.github.com/users/benmcmorran","html_url":"https://github.com/benmcmorran","followers_url":"https://api.github.com/users/benmcmorran/followers","following_url":"https://api.github.com/users/benmcmorran/following{/other_user}","gists_url":"https://api.github.com/users/benmcmorran/gists{/gist_id}","starred_url":"https://api.github.com/users/benmcmorran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmcmorran/subscriptions","organizations_url":"https://api.github.com/users/benmcmorran/orgs","repos_url":"https://api.github.com/users/benmcmorran/repos","events_url":"https://api.github.com/users/benmcmorran/events{/privacy}","received_events_url":"https://api.github.com/users/benmcmorran/received_events","type":"User","site_admin":false},"body":"Changes the search query so that notes are a hit if there is a match in the text or tags. Highlights matching tags. Changes the ordering of the search results when running on ElasticSearch from most recently updated to most relevant first.\r\n\r\nPlease review @cahrens @dan-f ","created_at":"2015-05-14T15:21:07Z","updated_at":"2015-05-14T19:45:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9aa9d71b25a8f55dbbbe9b3421386e5a8c03c286","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-notes-api/pulls/24/commits","review_comments_url":"https://api.github.com/repos/edx/edx-notes-api/pulls/24/comments","review_comment_url":"https://api.github.com/repos/edx/edx-notes-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-notes-api/issues/24/comments","statuses_url":"https://api.github.com/repos/edx/edx-notes-api/statuses/3ae8f3e2f87906ac12714879aac6b552537217f0","head":{"label":"edx:benmcmorran/search-tags","ref":"benmcmorran/search-tags","sha":"3ae8f3e2f87906ac12714879aac6b552537217f0","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":26452208,"name":"edx-notes-api","full_name":"edx/edx-notes-api","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-notes-api","description":"edx-notes-api","fork":false,"url":"https://api.github.com/repos/edx/edx-notes-api","forks_url":"https://api.github.com/repos/edx/edx-notes-api/forks","keys_url":"https://api.github.com/repos/edx/edx-notes-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-notes-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-notes-api/teams","hooks_url":"https://api.github.com/repos/edx/edx-notes-api/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-notes-api/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-notes-api/events","assignees_url":"https://api.github.com/repos/edx/edx-notes-api/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-notes-api/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-notes-api/tags","blobs_url":"https://api.github.com/repos/edx/edx-notes-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-notes-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-notes-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-notes-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-notes-api/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-notes-api/languages","stargazers_url":"https://api.github.com/repos/edx/edx-notes-api/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-notes-api/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-notes-api/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-notes-api/subscription","commits_url":"https://api.github.com/repos/edx/edx-notes-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-notes-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-notes-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-notes-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-notes-api/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-notes-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-notes-api/merges","archive_url":"https://api.github.com/repos/edx/edx-notes-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-notes-api/downloads","issues_url":"https://api.github.com/repos/edx/edx-notes-api/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-notes-api/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-notes-api/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-notes-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-notes-api/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-notes-api/releases{/id}","created_at":"2014-11-10T19:37:29Z","updated_at":"2015-05-09T08:34:17Z","pushed_at":"2015-05-14T19:33:54Z","git_url":"git://github.com/edx/edx-notes-api.git","ssh_url":"git@github.com:edx/edx-notes-api.git","clone_url":"https://github.com/edx/edx-notes-api.git","svn_url":"https://github.com/edx/edx-notes-api","homepage":null,"size":1950,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":4,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"4631c73ef8cb2fd481942ac2e44c734c6f756ebe","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":26452208,"name":"edx-notes-api","full_name":"edx/edx-notes-api","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-notes-api","description":"edx-notes-api","fork":false,"url":"https://api.github.com/repos/edx/edx-notes-api","forks_url":"https://api.github.com/repos/edx/edx-notes-api/forks","keys_url":"https://api.github.com/repos/edx/edx-notes-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-notes-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-notes-api/teams","hooks_url":"https://api.github.com/repos/edx/edx-notes-api/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-notes-api/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-notes-api/events","assignees_url":"https://api.github.com/repos/edx/edx-notes-api/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-notes-api/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-notes-api/tags","blobs_url":"https://api.github.com/repos/edx/edx-notes-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-notes-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-notes-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-notes-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-notes-api/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-notes-api/languages","stargazers_url":"https://api.github.com/repos/edx/edx-notes-api/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-notes-api/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-notes-api/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-notes-api/subscription","commits_url":"https://api.github.com/repos/edx/edx-notes-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-notes-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-notes-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-notes-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-notes-api/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-notes-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-notes-api/merges","archive_url":"https://api.github.com/repos/edx/edx-notes-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-notes-api/downloads","issues_url":"https://api.github.com/repos/edx/edx-notes-api/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-notes-api/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-notes-api/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-notes-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-notes-api/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-notes-api/releases{/id}","created_at":"2014-11-10T19:37:29Z","updated_at":"2015-05-09T08:34:17Z","pushed_at":"2015-05-14T19:33:54Z","git_url":"git://github.com/edx/edx-notes-api.git","ssh_url":"git@github.com:edx/edx-notes-api.git","clone_url":"https://github.com/edx/edx-notes-api.git","svn_url":"https://github.com/edx/edx-notes-api","homepage":null,"size":1950,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/24"},"html":{"href":"https://github.com/edx/edx-notes-api/pull/24"},"issue":{"href":"https://api.github.com/repos/edx/edx-notes-api/issues/24"},"comments":{"href":"https://api.github.com/repos/edx/edx-notes-api/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-notes-api/statuses/3ae8f3e2f87906ac12714879aac6b552537217f0"}}}}