{"action":"created","issue":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6294","repository_url":"https://api.github.com/repos/CenterForOpenScience/osf.io","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6294/labels{/name}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6294/comments","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6294/events","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6294","id":175791161,"number":6294,"title":"[feature] API Search [OSF-4254]","user":{"login":"caseyrollins","id":7913604,"avatar_url":"https://avatars.githubusercontent.com/u/7913604?v=3","gravatar_id":"","url":"https://api.github.com/users/caseyrollins","html_url":"https://github.com/caseyrollins","followers_url":"https://api.github.com/users/caseyrollins/followers","following_url":"https://api.github.com/users/caseyrollins/following{/other_user}","gists_url":"https://api.github.com/users/caseyrollins/gists{/gist_id}","starred_url":"https://api.github.com/users/caseyrollins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseyrollins/subscriptions","organizations_url":"https://api.github.com/users/caseyrollins/orgs","repos_url":"https://api.github.com/users/caseyrollins/repos","events_url":"https://api.github.com/users/caseyrollins/events{/privacy}","received_events_url":"https://api.github.com/users/caseyrollins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-08T15:52:15Z","updated_at":"2016-09-15T19:32:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6294","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6294","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/6294.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/6294.patch"},"body":"#### Purpose\r\n- Adds several search endpoints to API v2. Each endpoint can accept a search query via query parameters, e.g. `/v2/search/projects/?q=science` will search for projects with the word science in their title, description, tags, etc. \r\n - `/v2/search/`\r\n    - searches across files, projects, components, registrations, and users.\r\n    - all of the items returned from this search should be serialized appropriately in a single response (users serialized as users, registrations serialized as registrations, etc.)\r\n    - Additionally, this endpoint includes a `search_fields` dictionary in the response which contains the appropriate links and counts of results for each doc type. \r\n - `/v2/search/files/`\r\n   - searches across components -- query parameters will search within a file's name. \r\n - `/v2/search/projects/`\r\n   - searches across public projects -- query parameters will search within a project's title, description, tags, and contributor names. \r\n - `/v2/search/components/`\r\n   - searches across public components -- query parameters will search within a component's title, description, tags, and contributor names. \r\n - `/v2/search/registrations/`\r\n   - searches across public registrations -- query parameters will search within a registration's title, description, tags, and contributor names. \r\n - `/v2/search/users/`\r\n   - searches across public registrations -- query parameters will search within a user's given name, middle names, family name, jobs, and schools. \r\n\r\n#### Changes\r\n- views for each search type.\r\n- `SearchSerializer` to appropriately serialize the mixed models that are returned from the `/v2/search/` endpoint. \r\n- `SearchModelPaginator`, `SearchPaginator`, and `SearchPagination` classes to appropriately load the search results and paginate the endpoints since ES only returns 10 results at a time. \r\n\r\n#### Side Effects\r\n- None expected -- this PR contains additional endpoints for API v2 search, but does not alter existing ES functionality. \r\n\r\n#### Ticket\r\n- [OSF-4254](https://openscience.atlassian.net/browse/OSF-4254)\r\n"},"comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments/247428445","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6294#issuecomment-247428445","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6294","id":247428445,"user":{"login":"brianjgeiger","id":6599111,"avatar_url":"https://avatars.githubusercontent.com/u/6599111?v=3","gravatar_id":"","url":"https://api.github.com/users/brianjgeiger","html_url":"https://github.com/brianjgeiger","followers_url":"https://api.github.com/users/brianjgeiger/followers","following_url":"https://api.github.com/users/brianjgeiger/following{/other_user}","gists_url":"https://api.github.com/users/brianjgeiger/gists{/gist_id}","starred_url":"https://api.github.com/users/brianjgeiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianjgeiger/subscriptions","organizations_url":"https://api.github.com/users/brianjgeiger/orgs","repos_url":"https://api.github.com/users/brianjgeiger/repos","events_url":"https://api.github.com/users/brianjgeiger/events{/privacy}","received_events_url":"https://api.github.com/users/brianjgeiger/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T19:32:23Z","updated_at":"2016-09-15T19:32:23Z","body":"Could you put some sample JSON into the PR description? Especially the heterogeneous combined view."}}
{"actor":{"display_login":"brianjgeiger"}}