{"action":"created","comment":{"url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments/38303258","id":38303258,"diff_hunk":"@@ -0,0 +1,111 @@\n+module ListingIndexService::API\n+\n+  SelectionGroups = EntityUtils.define_builder(\n+    [:values, :array, :mandatory],\n+    [:search_type, one_of: [:and, :or]],\n+  )\n+\n+  NumericFilter = EntityUtils.define_builder(\n+    [:id, :fixnum, :mandatory],\n+    [:range, :range, :mandatory],\n+  )\n+\n+  SearchParams = EntityUtils.define_builder(\n+    [:page, :to_integer, default: 1, gte: 1],\n+    [:per_page, :to_integer, :mandatory, gte: 1],\n+    [:keywords, :string, :optional],\n+    [:category_id, :fixnum, :optional],\n+    [:listing_shape_id, :fixnum, :optional],\n+    [:price_cents, :range, :optional],\n+    [:checkboxes, entity: SelectionGroups],\n+    [:dropdowns, entity: SelectionGroups],","path":"app/services/listing_index_service/api/listings.rb","position":21,"original_position":21,"commit_id":"a377594a26c77d729380beab60e94a60288cb320","original_commit_id":"a377594a26c77d729380beab60e94a60288cb320","user":{"login":"rap1ds","id":429876,"avatar_url":"https://avatars.githubusercontent.com/u/429876?v=3","gravatar_id":"","url":"https://api.github.com/users/rap1ds","html_url":"https://github.com/rap1ds","followers_url":"https://api.github.com/users/rap1ds/followers","following_url":"https://api.github.com/users/rap1ds/following{/other_user}","gists_url":"https://api.github.com/users/rap1ds/gists{/gist_id}","starred_url":"https://api.github.com/users/rap1ds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rap1ds/subscriptions","organizations_url":"https://api.github.com/users/rap1ds/orgs","repos_url":"https://api.github.com/users/rap1ds/repos","events_url":"https://api.github.com/users/rap1ds/events{/privacy}","received_events_url":"https://api.github.com/users/rap1ds/received_events","type":"User","site_admin":false},"body":"Checkboxes and dropdown menus are representation details. The data type needs to be changed.","created_at":"2015-08-31T11:27:02Z","updated_at":"2015-08-31T11:27:02Z","html_url":"https://github.com/sharetribe/sharetribe/pull/1417#discussion_r38303258","pull_request_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1417","_links":{"self":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments/38303258"},"html":{"href":"https://github.com/sharetribe/sharetribe/pull/1417#discussion_r38303258"},"pull_request":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1417"}}},"pull_request":{"url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1417","id":43385093,"html_url":"https://github.com/sharetribe/sharetribe/pull/1417","diff_url":"https://github.com/sharetribe/sharetribe/pull/1417.diff","patch_url":"https://github.com/sharetribe/sharetribe/pull/1417.patch","issue_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/1417","number":1417,"state":"open","locked":false,"title":"ListingIndexService","user":{"login":"rap1ds","id":429876,"avatar_url":"https://avatars.githubusercontent.com/u/429876?v=3","gravatar_id":"","url":"https://api.github.com/users/rap1ds","html_url":"https://github.com/rap1ds","followers_url":"https://api.github.com/users/rap1ds/followers","following_url":"https://api.github.com/users/rap1ds/following{/other_user}","gists_url":"https://api.github.com/users/rap1ds/gists{/gist_id}","starred_url":"https://api.github.com/users/rap1ds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rap1ds/subscriptions","organizations_url":"https://api.github.com/users/rap1ds/orgs","repos_url":"https://api.github.com/users/rap1ds/repos","events_url":"https://api.github.com/users/rap1ds/events{/privacy}","received_events_url":"https://api.github.com/users/rap1ds/received_events","type":"User","site_admin":false},"body":"Abstract the underlying search engine (Sphinx or ElasticSearch). Return hash.\r\n\r\nCloses #1406 \r\n\r\nSearch parameters:\r\n- [X] Keywords\r\n- [X] Community\r\n- [X] Category\r\n- [x] Listing Shape\r\n- [X] Price\r\n- [x] Checkboxes\r\n- [x] Dropdowns\r\n- [x] Numbers\r\n\r\nPages:\r\n- [x] Homepage grid\r\n- [x] Homepage list\r\n- [x] Homepage map\r\n- [x] Atom feed\r\n\r\nRefactoring:\r\n- [ ] Remove icon name\r\n- [ ] Remove origin_loc/destination_loc","created_at":"2015-08-26T10:09:58Z","updated_at":"2015-08-31T11:27:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea05cc55f2293c34d34003e7ad47dfb732239823","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1417/commits","review_comments_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1417/comments","review_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/1417/comments","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/a377594a26c77d729380beab60e94a60288cb320","head":{"label":"sharetribe:search-service","ref":"search-service","sha":"a377594a26c77d729380beab60e94a60288cb320","user":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"repo":{"id":4447023,"name":"sharetribe","full_name":"sharetribe/sharetribe","owner":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharetribe/sharetribe","description":"Open source marketplace platform","fork":false,"url":"https://api.github.com/repos/sharetribe/sharetribe","forks_url":"https://api.github.com/repos/sharetribe/sharetribe/forks","keys_url":"https://api.github.com/repos/sharetribe/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharetribe/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharetribe/sharetribe/teams","hooks_url":"https://api.github.com/repos/sharetribe/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/sharetribe/sharetribe/events","assignees_url":"https://api.github.com/repos/sharetribe/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/sharetribe/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/sharetribe/sharetribe/tags","blobs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharetribe/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharetribe/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/sharetribe/sharetribe/languages","stargazers_url":"https://api.github.com/repos/sharetribe/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/sharetribe/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/sharetribe/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/sharetribe/sharetribe/subscription","commits_url":"https://api.github.com/repos/sharetribe/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharetribe/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharetribe/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/sharetribe/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharetribe/sharetribe/merges","archive_url":"https://api.github.com/repos/sharetribe/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharetribe/sharetribe/downloads","issues_url":"https://api.github.com/repos/sharetribe/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/sharetribe/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/sharetribe/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/sharetribe/sharetribe/releases{/id}","created_at":"2012-05-25T15:34:17Z","updated_at":"2015-08-31T00:56:10Z","pushed_at":"2015-08-31T10:41:15Z","git_url":"git://github.com/sharetribe/sharetribe.git","ssh_url":"git@github.com:sharetribe/sharetribe.git","clone_url":"https://github.com/sharetribe/sharetribe.git","svn_url":"https://github.com/sharetribe/sharetribe","homepage":"https://www.sharetribe.com","size":120311,"stargazers_count":388,"watchers_count":388,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":259,"mirror_url":null,"open_issues_count":14,"forks":259,"open_issues":14,"watchers":388,"default_branch":"master"}},"base":{"label":"sharetribe:master","ref":"master","sha":"e13befe6075d566b1ebc281699094c2d38a893a5","user":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"repo":{"id":4447023,"name":"sharetribe","full_name":"sharetribe/sharetribe","owner":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharetribe/sharetribe","description":"Open source marketplace platform","fork":false,"url":"https://api.github.com/repos/sharetribe/sharetribe","forks_url":"https://api.github.com/repos/sharetribe/sharetribe/forks","keys_url":"https://api.github.com/repos/sharetribe/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharetribe/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharetribe/sharetribe/teams","hooks_url":"https://api.github.com/repos/sharetribe/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/sharetribe/sharetribe/events","assignees_url":"https://api.github.com/repos/sharetribe/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/sharetribe/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/sharetribe/sharetribe/tags","blobs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharetribe/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharetribe/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/sharetribe/sharetribe/languages","stargazers_url":"https://api.github.com/repos/sharetribe/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/sharetribe/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/sharetribe/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/sharetribe/sharetribe/subscription","commits_url":"https://api.github.com/repos/sharetribe/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharetribe/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharetribe/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/sharetribe/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharetribe/sharetribe/merges","archive_url":"https://api.github.com/repos/sharetribe/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharetribe/sharetribe/downloads","issues_url":"https://api.github.com/repos/sharetribe/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/sharetribe/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/sharetribe/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/sharetribe/sharetribe/releases{/id}","created_at":"2012-05-25T15:34:17Z","updated_at":"2015-08-31T00:56:10Z","pushed_at":"2015-08-31T10:41:15Z","git_url":"git://github.com/sharetribe/sharetribe.git","ssh_url":"git@github.com:sharetribe/sharetribe.git","clone_url":"https://github.com/sharetribe/sharetribe.git","svn_url":"https://github.com/sharetribe/sharetribe","homepage":"https://www.sharetribe.com","size":120311,"stargazers_count":388,"watchers_count":388,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":259,"mirror_url":null,"open_issues_count":14,"forks":259,"open_issues":14,"watchers":388,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1417"},"html":{"href":"https://github.com/sharetribe/sharetribe/pull/1417"},"issue":{"href":"https://api.github.com/repos/sharetribe/sharetribe/issues/1417"},"comments":{"href":"https://api.github.com/repos/sharetribe/sharetribe/issues/1417/comments"},"review_comments":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1417/comments"},"review_comment":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1417/commits"},"statuses":{"href":"https://api.github.com/repos/sharetribe/sharetribe/statuses/a377594a26c77d729380beab60e94a60288cb320"}}}}