{"action":"created","comment":{"url":"https://api.github.com/repos/hasgeek/hasjob/pulls/comments/25165763","id":25165763,"diff_hunk":"@@ -1,83 +1,45 @@\n # -*- coding: utf-8 -*-\n \n-import os.path\n from flask.ext.sqlalchemy import models_committed\n from flask.ext.rq import job\n-import time\n-from sqlalchemy.exc import ProgrammingError\n-from whoosh import fields, index\n-from whoosh.index import LockError\n-from whoosh.qparser import QueryParser\n-from whoosh.analysis import StemmingAnalyzer\n-\n from hasjob import models, app\n \n+from pyelasticsearch import ElasticSearch\n+es = ElasticSearch('http://localhost:9200/')\n+\n+INDEXABLE = (models.JobPost,)","path":"hasjob/search.py","position":18,"original_position":18,"commit_id":"9049a21c85fa7284411d6dab397c8c32a34d705d","original_commit_id":"9049a21c85fa7284411d6dab397c8c32a34d705d","user":{"login":"jace","id":26695,"avatar_url":"https://avatars.githubusercontent.com/u/26695?v=3","gravatar_id":"","url":"https://api.github.com/users/jace","html_url":"https://github.com/jace","followers_url":"https://api.github.com/users/jace/followers","following_url":"https://api.github.com/users/jace/following{/other_user}","gists_url":"https://api.github.com/users/jace/gists{/gist_id}","starred_url":"https://api.github.com/users/jace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jace/subscriptions","organizations_url":"https://api.github.com/users/jace/orgs","repos_url":"https://api.github.com/users/jace/repos","events_url":"https://api.github.com/users/jace/events{/privacy}","received_events_url":"https://api.github.com/users/jace/received_events","type":"User","site_admin":false},"body":"Are we not indexing `JobType`, `JobCategory` and `Tag`? We'll have more document types soon: `Domain`, `JobApplication`, `Organization` and more.","created_at":"2015-02-23T14:10:39Z","updated_at":"2015-02-23T14:10:39Z","html_url":"https://github.com/hasgeek/hasjob/pull/153#discussion_r25165763","pull_request_url":"https://api.github.com/repos/hasgeek/hasjob/pulls/153","_links":{"self":{"href":"https://api.github.com/repos/hasgeek/hasjob/pulls/comments/25165763"},"html":{"href":"https://github.com/hasgeek/hasjob/pull/153#discussion_r25165763"},"pull_request":{"href":"https://api.github.com/repos/hasgeek/hasjob/pulls/153"}}},"pull_request":{"url":"https://api.github.com/repos/hasgeek/hasjob/pulls/153","id":29809990,"html_url":"https://github.com/hasgeek/hasjob/pull/153","diff_url":"https://github.com/hasgeek/hasjob/pull/153.diff","patch_url":"https://github.com/hasgeek/hasjob/pull/153.patch","issue_url":"https://api.github.com/repos/hasgeek/hasjob/issues/153","number":153,"state":"open","locked":false,"title":"Replaced Whoosh with ElasticSearch","user":{"login":"shreyas-satish","id":380688,"avatar_url":"https://avatars.githubusercontent.com/u/380688?v=3","gravatar_id":"","url":"https://api.github.com/users/shreyas-satish","html_url":"https://github.com/shreyas-satish","followers_url":"https://api.github.com/users/shreyas-satish/followers","following_url":"https://api.github.com/users/shreyas-satish/following{/other_user}","gists_url":"https://api.github.com/users/shreyas-satish/gists{/gist_id}","starred_url":"https://api.github.com/users/shreyas-satish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreyas-satish/subscriptions","organizations_url":"https://api.github.com/users/shreyas-satish/orgs","repos_url":"https://api.github.com/users/shreyas-satish/repos","events_url":"https://api.github.com/users/shreyas-satish/events{/privacy}","received_events_url":"https://api.github.com/users/shreyas-satish/received_events","type":"User","site_admin":false},"body":"Using [pyelasticsearch](https://pyelasticsearch.readthedocs.org/en/latest/) to connect to Elastic Search.\r\n\r\nFor Reference:\r\nhttp://www.elasticsearch.org/guide/en/elasticsearch/guide/current/scoring-theory.html\r\nhttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html","created_at":"2015-02-23T13:55:16Z","updated_at":"2015-02-23T14:10:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a282f1b6bfda2954d59b6f06197b71246920f46e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hasgeek/hasjob/pulls/153/commits","review_comments_url":"https://api.github.com/repos/hasgeek/hasjob/pulls/153/comments","review_comment_url":"https://api.github.com/repos/hasgeek/hasjob/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hasgeek/hasjob/issues/153/comments","statuses_url":"https://api.github.com/repos/hasgeek/hasjob/statuses/9049a21c85fa7284411d6dab397c8c32a34d705d","head":{"label":"hasgeek:es","ref":"es","sha":"9049a21c85fa7284411d6dab397c8c32a34d705d","user":{"login":"hasgeek","id":443850,"avatar_url":"https://avatars.githubusercontent.com/u/443850?v=3","gravatar_id":"","url":"https://api.github.com/users/hasgeek","html_url":"https://github.com/hasgeek","followers_url":"https://api.github.com/users/hasgeek/followers","following_url":"https://api.github.com/users/hasgeek/following{/other_user}","gists_url":"https://api.github.com/users/hasgeek/gists{/gist_id}","starred_url":"https://api.github.com/users/hasgeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasgeek/subscriptions","organizations_url":"https://api.github.com/users/hasgeek/orgs","repos_url":"https://api.github.com/users/hasgeek/repos","events_url":"https://api.github.com/users/hasgeek/events{/privacy}","received_events_url":"https://api.github.com/users/hasgeek/received_events","type":"Organization","site_admin":false},"repo":{"id":1644676,"name":"hasjob","full_name":"hasgeek/hasjob","owner":{"login":"hasgeek","id":443850,"avatar_url":"https://avatars.githubusercontent.com/u/443850?v=3","gravatar_id":"","url":"https://api.github.com/users/hasgeek","html_url":"https://github.com/hasgeek","followers_url":"https://api.github.com/users/hasgeek/followers","following_url":"https://api.github.com/users/hasgeek/following{/other_user}","gists_url":"https://api.github.com/users/hasgeek/gists{/gist_id}","starred_url":"https://api.github.com/users/hasgeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasgeek/subscriptions","organizations_url":"https://api.github.com/users/hasgeek/orgs","repos_url":"https://api.github.com/users/hasgeek/repos","events_url":"https://api.github.com/users/hasgeek/events{/privacy}","received_events_url":"https://api.github.com/users/hasgeek/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hasgeek/hasjob","description":"Hasjob, the HasGeek job board","fork":false,"url":"https://api.github.com/repos/hasgeek/hasjob","forks_url":"https://api.github.com/repos/hasgeek/hasjob/forks","keys_url":"https://api.github.com/repos/hasgeek/hasjob/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hasgeek/hasjob/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hasgeek/hasjob/teams","hooks_url":"https://api.github.com/repos/hasgeek/hasjob/hooks","issue_events_url":"https://api.github.com/repos/hasgeek/hasjob/issues/events{/number}","events_url":"https://api.github.com/repos/hasgeek/hasjob/events","assignees_url":"https://api.github.com/repos/hasgeek/hasjob/assignees{/user}","branches_url":"https://api.github.com/repos/hasgeek/hasjob/branches{/branch}","tags_url":"https://api.github.com/repos/hasgeek/hasjob/tags","blobs_url":"https://api.github.com/repos/hasgeek/hasjob/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hasgeek/hasjob/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hasgeek/hasjob/git/refs{/sha}","trees_url":"https://api.github.com/repos/hasgeek/hasjob/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hasgeek/hasjob/statuses/{sha}","languages_url":"https://api.github.com/repos/hasgeek/hasjob/languages","stargazers_url":"https://api.github.com/repos/hasgeek/hasjob/stargazers","contributors_url":"https://api.github.com/repos/hasgeek/hasjob/contributors","subscribers_url":"https://api.github.com/repos/hasgeek/hasjob/subscribers","subscription_url":"https://api.github.com/repos/hasgeek/hasjob/subscription","commits_url":"https://api.github.com/repos/hasgeek/hasjob/commits{/sha}","git_commits_url":"https://api.github.com/repos/hasgeek/hasjob/git/commits{/sha}","comments_url":"https://api.github.com/repos/hasgeek/hasjob/comments{/number}","issue_comment_url":"https://api.github.com/repos/hasgeek/hasjob/issues/comments{/number}","contents_url":"https://api.github.com/repos/hasgeek/hasjob/contents/{+path}","compare_url":"https://api.github.com/repos/hasgeek/hasjob/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hasgeek/hasjob/merges","archive_url":"https://api.github.com/repos/hasgeek/hasjob/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hasgeek/hasjob/downloads","issues_url":"https://api.github.com/repos/hasgeek/hasjob/issues{/number}","pulls_url":"https://api.github.com/repos/hasgeek/hasjob/pulls{/number}","milestones_url":"https://api.github.com/repos/hasgeek/hasjob/milestones{/number}","notifications_url":"https://api.github.com/repos/hasgeek/hasjob/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hasgeek/hasjob/labels{/name}","releases_url":"https://api.github.com/repos/hasgeek/hasjob/releases{/id}","created_at":"2011-04-21T09:29:49Z","updated_at":"2015-02-23T05:40:41Z","pushed_at":"2015-02-23T14:04:26Z","git_url":"git://github.com/hasgeek/hasjob.git","ssh_url":"git@github.com:hasgeek/hasjob.git","clone_url":"https://github.com/hasgeek/hasjob.git","svn_url":"https://github.com/hasgeek/hasjob","homepage":"https://hasjob.co","size":4993,"stargazers_count":79,"watchers_count":79,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":58,"forks":44,"open_issues":58,"watchers":79,"default_branch":"master"}},"base":{"label":"hasgeek:master","ref":"master","sha":"2dbde659649e3b64d440c4dcc6165d08296a3b61","user":{"login":"hasgeek","id":443850,"avatar_url":"https://avatars.githubusercontent.com/u/443850?v=3","gravatar_id":"","url":"https://api.github.com/users/hasgeek","html_url":"https://github.com/hasgeek","followers_url":"https://api.github.com/users/hasgeek/followers","following_url":"https://api.github.com/users/hasgeek/following{/other_user}","gists_url":"https://api.github.com/users/hasgeek/gists{/gist_id}","starred_url":"https://api.github.com/users/hasgeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasgeek/subscriptions","organizations_url":"https://api.github.com/users/hasgeek/orgs","repos_url":"https://api.github.com/users/hasgeek/repos","events_url":"https://api.github.com/users/hasgeek/events{/privacy}","received_events_url":"https://api.github.com/users/hasgeek/received_events","type":"Organization","site_admin":false},"repo":{"id":1644676,"name":"hasjob","full_name":"hasgeek/hasjob","owner":{"login":"hasgeek","id":443850,"avatar_url":"https://avatars.githubusercontent.com/u/443850?v=3","gravatar_id":"","url":"https://api.github.com/users/hasgeek","html_url":"https://github.com/hasgeek","followers_url":"https://api.github.com/users/hasgeek/followers","following_url":"https://api.github.com/users/hasgeek/following{/other_user}","gists_url":"https://api.github.com/users/hasgeek/gists{/gist_id}","starred_url":"https://api.github.com/users/hasgeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasgeek/subscriptions","organizations_url":"https://api.github.com/users/hasgeek/orgs","repos_url":"https://api.github.com/users/hasgeek/repos","events_url":"https://api.github.com/users/hasgeek/events{/privacy}","received_events_url":"https://api.github.com/users/hasgeek/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hasgeek/hasjob","description":"Hasjob, the HasGeek job board","fork":false,"url":"https://api.github.com/repos/hasgeek/hasjob","forks_url":"https://api.github.com/repos/hasgeek/hasjob/forks","keys_url":"https://api.github.com/repos/hasgeek/hasjob/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hasgeek/hasjob/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hasgeek/hasjob/teams","hooks_url":"https://api.github.com/repos/hasgeek/hasjob/hooks","issue_events_url":"https://api.github.com/repos/hasgeek/hasjob/issues/events{/number}","events_url":"https://api.github.com/repos/hasgeek/hasjob/events","assignees_url":"https://api.github.com/repos/hasgeek/hasjob/assignees{/user}","branches_url":"https://api.github.com/repos/hasgeek/hasjob/branches{/branch}","tags_url":"https://api.github.com/repos/hasgeek/hasjob/tags","blobs_url":"https://api.github.com/repos/hasgeek/hasjob/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hasgeek/hasjob/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hasgeek/hasjob/git/refs{/sha}","trees_url":"https://api.github.com/repos/hasgeek/hasjob/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hasgeek/hasjob/statuses/{sha}","languages_url":"https://api.github.com/repos/hasgeek/hasjob/languages","stargazers_url":"https://api.github.com/repos/hasgeek/hasjob/stargazers","contributors_url":"https://api.github.com/repos/hasgeek/hasjob/contributors","subscribers_url":"https://api.github.com/repos/hasgeek/hasjob/subscribers","subscription_url":"https://api.github.com/repos/hasgeek/hasjob/subscription","commits_url":"https://api.github.com/repos/hasgeek/hasjob/commits{/sha}","git_commits_url":"https://api.github.com/repos/hasgeek/hasjob/git/commits{/sha}","comments_url":"https://api.github.com/repos/hasgeek/hasjob/comments{/number}","issue_comment_url":"https://api.github.com/repos/hasgeek/hasjob/issues/comments{/number}","contents_url":"https://api.github.com/repos/hasgeek/hasjob/contents/{+path}","compare_url":"https://api.github.com/repos/hasgeek/hasjob/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hasgeek/hasjob/merges","archive_url":"https://api.github.com/repos/hasgeek/hasjob/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hasgeek/hasjob/downloads","issues_url":"https://api.github.com/repos/hasgeek/hasjob/issues{/number}","pulls_url":"https://api.github.com/repos/hasgeek/hasjob/pulls{/number}","milestones_url":"https://api.github.com/repos/hasgeek/hasjob/milestones{/number}","notifications_url":"https://api.github.com/repos/hasgeek/hasjob/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hasgeek/hasjob/labels{/name}","releases_url":"https://api.github.com/repos/hasgeek/hasjob/releases{/id}","created_at":"2011-04-21T09:29:49Z","updated_at":"2015-02-23T05:40:41Z","pushed_at":"2015-02-23T14:04:26Z","git_url":"git://github.com/hasgeek/hasjob.git","ssh_url":"git@github.com:hasgeek/hasjob.git","clone_url":"https://github.com/hasgeek/hasjob.git","svn_url":"https://github.com/hasgeek/hasjob","homepage":"https://hasjob.co","size":4993,"stargazers_count":79,"watchers_count":79,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":58,"forks":44,"open_issues":58,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hasgeek/hasjob/pulls/153"},"html":{"href":"https://github.com/hasgeek/hasjob/pull/153"},"issue":{"href":"https://api.github.com/repos/hasgeek/hasjob/issues/153"},"comments":{"href":"https://api.github.com/repos/hasgeek/hasjob/issues/153/comments"},"review_comments":{"href":"https://api.github.com/repos/hasgeek/hasjob/pulls/153/comments"},"review_comment":{"href":"https://api.github.com/repos/hasgeek/hasjob/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hasgeek/hasjob/pulls/153/commits"},"statuses":{"href":"https://api.github.com/repos/hasgeek/hasjob/statuses/9049a21c85fa7284411d6dab397c8c32a34d705d"}}}}