{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/36418631","id":36418631,"diff_hunk":"@@ -87,6 +92,14 @@ ShareApp.controller = function() {\n \n     });\n \n+    m.request({\n+        method: 'GET',\n+        url: '/api/v1/share/documents/' // TODO where will the postgres API live??\n+    }).then(function(data) {\n+        self.vm.rawNormedLoaded(true);\n+    }, function(err) {\n+        // blank, but needed to handle missing rawNormed API","path":"website/static/js/share/index.js","position":null,"original_position":35,"commit_id":"db69c27cc454c3ba25e33e71f51e04fbfb6c9b92","original_commit_id":"e10019b8d411885245b0709af59c77a08dd84c7d","user":{"login":"fabianvf","id":2431974,"avatar_url":"https://avatars.githubusercontent.com/u/2431974?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianvf","html_url":"https://github.com/fabianvf","followers_url":"https://api.github.com/users/fabianvf/followers","following_url":"https://api.github.com/users/fabianvf/following{/other_user}","gists_url":"https://api.github.com/users/fabianvf/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianvf/subscriptions","organizations_url":"https://api.github.com/users/fabianvf/orgs","repos_url":"https://api.github.com/users/fabianvf/repos","events_url":"https://api.github.com/users/fabianvf/events{/privacy}","received_events_url":"https://api.github.com/users/fabianvf/received_events","type":"User","site_admin":false},"body":":+1:","created_at":"2015-08-06T14:14:37Z","updated_at":"2015-08-06T14:14:37Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/3500#discussion_r36418631","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3500","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/36418631"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/3500#discussion_r36418631"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3500"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3500","id":39523368,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/3500","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/3500.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/3500.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3500","number":3500,"state":"open","locked":false,"title":"Bring SHARE search up to date with schema, and improve interface","user":{"login":"fabianvf","id":2431974,"avatar_url":"https://avatars.githubusercontent.com/u/2431974?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianvf","html_url":"https://github.com/fabianvf","followers_url":"https://api.github.com/users/fabianvf/followers","following_url":"https://api.github.com/users/fabianvf/following{/other_user}","gists_url":"https://api.github.com/users/fabianvf/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianvf/subscriptions","organizations_url":"https://api.github.com/users/fabianvf/orgs","repos_url":"https://api.github.com/users/fabianvf/repos","events_url":"https://api.github.com/users/fabianvf/events{/privacy}","received_events_url":"https://api.github.com/users/fabianvf/received_events","type":"User","site_admin":false},"body":"Purpose\r\n-----------\r\nSHARE search is way out of date with the schema, and still relies on the query string query, which is pretty unintuitive to use.\r\n\r\nChanges\r\n-------------\r\nThis brings everything up to date with the current SHARE schema, which mostly involved renaming fields. It also bring query building to the frontend, which allows us to have very custom and variable queries without having to build routes/functions on the backend to handle them.\r\n\r\nAlso currently adds highlighting to the results, which shows you what part of the result matched your query. Might not keep that though, needs discussion.\r\n\r\n@erinspace Added a feature that will be hidden for a while, which allows you to see the raw and normalized documents for a given result. The API for that is not currently written, but it fails away pretty gracefully, so that shouldn't be a big deal.\r\n\r\n@bdyetton Rewrote the aggregations so that they are built with the new query/filter system and are created and parsed into graphs on the frontend, instead of the backend. That also means that there should be some cleanup in share_search.py, though that doesn't have to happen right now.\r\n\r\nSide-effects\r\n----------------\r\nLimited to the SHARE search page, but we have changed how query building, aggregations, filters and pretty much everything else works. We have also written some new tests, and looked at the functionality in firefox + chrome (I'll see if I can check out IE). Someone that isn't me should definitely just push everything on the page though, since so much was changed.\r\n\r\nTODO:\r\n-----------\r\n- [x] Move query building to frontend\r\n- [x] Update result parsing to use the new schema\r\n- [x] Update the filter generators to use the new schema\r\n- [x] Change from query string to a more complex/intuitive search interface\r\n- [x] Update the atom feed\r\n- [x] Aggregations (Ben is working on this)\r\n  - [x] Move building aggregations to the frontend\r\n  - [x] Move parsing aggregations into graphs to the frontend \r\n- [x] Add the ability to see the raw and normalized metadata from the search page (Erin is working on this, and it requires corresponding changes on scrAPI)\r\n  - [x] If the API is not up, don't load the data tab\r\n  - [x] Don't crash if individual items can't be found\r\n- [x] Tests\r\n  - [x] Javascript\r\n  - [x] Update python tests\r\n-  Deferred\r\n  -  Replace the sidebar with faceted search (using aggregations)\r\n    - Might be automatically generateable with JSON schemas.\r\n\r\nIssues:\r\n-----------\r\n- [x] Items with no title or description do not display correctly.\r\n- [x] The graphs break on some queries (unsure of cause)\r\n  - This was because there were no hard filters on the range of the field, and the query that broke it extended the bounds of the min, meaning that the size of the buckets was inconsistent across sources.\r\n \r\nSpecial thanks to @erinspace and @bdyetton ","created_at":"2015-07-08T21:06:21Z","updated_at":"2015-08-06T14:14:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78c3f5903f002ad95d90c9376834b18df19ce33c","assignee":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/45","html_url":"https://github.com/CenterForOpenScience/osf.io/milestones/0.46.0","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/45/labels","id":1235545,"number":45,"title":"0.46.0","description":"","creator":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":3,"state":"open","created_at":"2015-07-31T18:20:56Z","updated_at":"2015-08-05T20:14:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3500/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3500/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3500/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/db69c27cc454c3ba25e33e71f51e04fbfb6c9b92","head":{"label":"fabianvf:feature/share-improved-search","ref":"feature/share-improved-search","sha":"db69c27cc454c3ba25e33e71f51e04fbfb6c9b92","user":{"login":"fabianvf","id":2431974,"avatar_url":"https://avatars.githubusercontent.com/u/2431974?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianvf","html_url":"https://github.com/fabianvf","followers_url":"https://api.github.com/users/fabianvf/followers","following_url":"https://api.github.com/users/fabianvf/following{/other_user}","gists_url":"https://api.github.com/users/fabianvf/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianvf/subscriptions","organizations_url":"https://api.github.com/users/fabianvf/orgs","repos_url":"https://api.github.com/users/fabianvf/repos","events_url":"https://api.github.com/users/fabianvf/events{/privacy}","received_events_url":"https://api.github.com/users/fabianvf/received_events","type":"User","site_admin":false},"repo":{"id":26976354,"name":"osf.io","full_name":"fabianvf/osf.io","owner":{"login":"fabianvf","id":2431974,"avatar_url":"https://avatars.githubusercontent.com/u/2431974?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianvf","html_url":"https://github.com/fabianvf","followers_url":"https://api.github.com/users/fabianvf/followers","following_url":"https://api.github.com/users/fabianvf/following{/other_user}","gists_url":"https://api.github.com/users/fabianvf/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianvf/subscriptions","organizations_url":"https://api.github.com/users/fabianvf/orgs","repos_url":"https://api.github.com/users/fabianvf/repos","events_url":"https://api.github.com/users/fabianvf/events{/privacy}","received_events_url":"https://api.github.com/users/fabianvf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fabianvf/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/fabianvf/osf.io","forks_url":"https://api.github.com/repos/fabianvf/osf.io/forks","keys_url":"https://api.github.com/repos/fabianvf/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabianvf/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabianvf/osf.io/teams","hooks_url":"https://api.github.com/repos/fabianvf/osf.io/hooks","issue_events_url":"https://api.github.com/repos/fabianvf/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/fabianvf/osf.io/events","assignees_url":"https://api.github.com/repos/fabianvf/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/fabianvf/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/fabianvf/osf.io/tags","blobs_url":"https://api.github.com/repos/fabianvf/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabianvf/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabianvf/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabianvf/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabianvf/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/fabianvf/osf.io/languages","stargazers_url":"https://api.github.com/repos/fabianvf/osf.io/stargazers","contributors_url":"https://api.github.com/repos/fabianvf/osf.io/contributors","subscribers_url":"https://api.github.com/repos/fabianvf/osf.io/subscribers","subscription_url":"https://api.github.com/repos/fabianvf/osf.io/subscription","commits_url":"https://api.github.com/repos/fabianvf/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabianvf/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabianvf/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabianvf/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabianvf/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/fabianvf/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabianvf/osf.io/merges","archive_url":"https://api.github.com/repos/fabianvf/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabianvf/osf.io/downloads","issues_url":"https://api.github.com/repos/fabianvf/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/fabianvf/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/fabianvf/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/fabianvf/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabianvf/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/fabianvf/osf.io/releases{/id}","created_at":"2014-11-21T20:18:30Z","updated_at":"2015-04-07T21:09:55Z","pushed_at":"2015-08-06T13:08:08Z","git_url":"git://github.com/fabianvf/osf.io.git","ssh_url":"git@github.com:fabianvf/osf.io.git","clone_url":"https://github.com/fabianvf/osf.io.git","svn_url":"https://github.com/fabianvf/osf.io","homepage":"http://osf.io","size":97494,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"9f2480a89322f8e2fd0ff257262726da7f10c034","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","created_at":"2013-05-21T15:53:37Z","updated_at":"2015-08-05T16:17:51Z","pushed_at":"2015-08-06T13:53:43Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"http://osf.io","size":221429,"stargazers_count":125,"watchers_count":125,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":526,"forks":107,"open_issues":526,"watchers":125,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3500"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/3500"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3500"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3500/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3500/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3500/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/db69c27cc454c3ba25e33e71f51e04fbfb6c9b92"}}}}