{"action":"opened","number":247,"pull_request":{"url":"https://api.github.com/repos/toptal/chewy/pulls/247","id":44549766,"html_url":"https://github.com/toptal/chewy/pull/247","diff_url":"https://github.com/toptal/chewy/pull/247.diff","patch_url":"https://github.com/toptal/chewy/pull/247.patch","issue_url":"https://api.github.com/repos/toptal/chewy/issues/247","number":247,"state":"open","locked":false,"title":"Make it faster","user":{"login":"biow0lf","id":93578,"avatar_url":"https://avatars.githubusercontent.com/u/93578?v=3","gravatar_id":"","url":"https://api.github.com/users/biow0lf","html_url":"https://github.com/biow0lf","followers_url":"https://api.github.com/users/biow0lf/followers","following_url":"https://api.github.com/users/biow0lf/following{/other_user}","gists_url":"https://api.github.com/users/biow0lf/gists{/gist_id}","starred_url":"https://api.github.com/users/biow0lf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biow0lf/subscriptions","organizations_url":"https://api.github.com/users/biow0lf/orgs","repos_url":"https://api.github.com/users/biow0lf/repos","events_url":"https://api.github.com/users/biow0lf/events{/privacy}","received_events_url":"https://api.github.com/users/biow0lf/received_events","type":"User","site_admin":false},"body":"In this code we don't need position on text, only matching.\r\n\r\nBenchmark code: https://gist.github.com/biow0lf/e4cd0082899c2d83f3fe\r\n\r\n```\r\nigor@Zubkov-PC:~/opensource/chewy$ ruby benchmark.rb \r\n       user     system      total        real\r\n  43.820000   0.020000  43.840000 ( 47.276215)\r\n  20.930000   0.020000  20.950000 ( 22.135514)\r\nigor@Zubkov-PC:~/opensource/chewy$ \r\n```\r\n","created_at":"2015-09-09T13:32:33Z","updated_at":"2015-09-09T13:32:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/toptal/chewy/pulls/247/commits","review_comments_url":"https://api.github.com/repos/toptal/chewy/pulls/247/comments","review_comment_url":"https://api.github.com/repos/toptal/chewy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/toptal/chewy/issues/247/comments","statuses_url":"https://api.github.com/repos/toptal/chewy/statuses/98dcd1a220dbc568138ed88d8e9cdd2742429677","head":{"label":"biow0lf:master","ref":"master","sha":"98dcd1a220dbc568138ed88d8e9cdd2742429677","user":{"login":"biow0lf","id":93578,"avatar_url":"https://avatars.githubusercontent.com/u/93578?v=3","gravatar_id":"","url":"https://api.github.com/users/biow0lf","html_url":"https://github.com/biow0lf","followers_url":"https://api.github.com/users/biow0lf/followers","following_url":"https://api.github.com/users/biow0lf/following{/other_user}","gists_url":"https://api.github.com/users/biow0lf/gists{/gist_id}","starred_url":"https://api.github.com/users/biow0lf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biow0lf/subscriptions","organizations_url":"https://api.github.com/users/biow0lf/orgs","repos_url":"https://api.github.com/users/biow0lf/repos","events_url":"https://api.github.com/users/biow0lf/events{/privacy}","received_events_url":"https://api.github.com/users/biow0lf/received_events","type":"User","site_admin":false},"repo":{"id":40171458,"name":"chewy","full_name":"biow0lf/chewy","owner":{"login":"biow0lf","id":93578,"avatar_url":"https://avatars.githubusercontent.com/u/93578?v=3","gravatar_id":"","url":"https://api.github.com/users/biow0lf","html_url":"https://github.com/biow0lf","followers_url":"https://api.github.com/users/biow0lf/followers","following_url":"https://api.github.com/users/biow0lf/following{/other_user}","gists_url":"https://api.github.com/users/biow0lf/gists{/gist_id}","starred_url":"https://api.github.com/users/biow0lf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biow0lf/subscriptions","organizations_url":"https://api.github.com/users/biow0lf/orgs","repos_url":"https://api.github.com/users/biow0lf/repos","events_url":"https://api.github.com/users/biow0lf/events{/privacy}","received_events_url":"https://api.github.com/users/biow0lf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/biow0lf/chewy","description":"High-level Elasticsearch Ruby framework based on the official elasticsearch-ruby client","fork":true,"url":"https://api.github.com/repos/biow0lf/chewy","forks_url":"https://api.github.com/repos/biow0lf/chewy/forks","keys_url":"https://api.github.com/repos/biow0lf/chewy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biow0lf/chewy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biow0lf/chewy/teams","hooks_url":"https://api.github.com/repos/biow0lf/chewy/hooks","issue_events_url":"https://api.github.com/repos/biow0lf/chewy/issues/events{/number}","events_url":"https://api.github.com/repos/biow0lf/chewy/events","assignees_url":"https://api.github.com/repos/biow0lf/chewy/assignees{/user}","branches_url":"https://api.github.com/repos/biow0lf/chewy/branches{/branch}","tags_url":"https://api.github.com/repos/biow0lf/chewy/tags","blobs_url":"https://api.github.com/repos/biow0lf/chewy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biow0lf/chewy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biow0lf/chewy/git/refs{/sha}","trees_url":"https://api.github.com/repos/biow0lf/chewy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biow0lf/chewy/statuses/{sha}","languages_url":"https://api.github.com/repos/biow0lf/chewy/languages","stargazers_url":"https://api.github.com/repos/biow0lf/chewy/stargazers","contributors_url":"https://api.github.com/repos/biow0lf/chewy/contributors","subscribers_url":"https://api.github.com/repos/biow0lf/chewy/subscribers","subscription_url":"https://api.github.com/repos/biow0lf/chewy/subscription","commits_url":"https://api.github.com/repos/biow0lf/chewy/commits{/sha}","git_commits_url":"https://api.github.com/repos/biow0lf/chewy/git/commits{/sha}","comments_url":"https://api.github.com/repos/biow0lf/chewy/comments{/number}","issue_comment_url":"https://api.github.com/repos/biow0lf/chewy/issues/comments{/number}","contents_url":"https://api.github.com/repos/biow0lf/chewy/contents/{+path}","compare_url":"https://api.github.com/repos/biow0lf/chewy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biow0lf/chewy/merges","archive_url":"https://api.github.com/repos/biow0lf/chewy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biow0lf/chewy/downloads","issues_url":"https://api.github.com/repos/biow0lf/chewy/issues{/number}","pulls_url":"https://api.github.com/repos/biow0lf/chewy/pulls{/number}","milestones_url":"https://api.github.com/repos/biow0lf/chewy/milestones{/number}","notifications_url":"https://api.github.com/repos/biow0lf/chewy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biow0lf/chewy/labels{/name}","releases_url":"https://api.github.com/repos/biow0lf/chewy/releases{/id}","created_at":"2015-08-04T08:03:38Z","updated_at":"2015-08-04T08:03:38Z","pushed_at":"2015-09-09T13:29:59Z","git_url":"git://github.com/biow0lf/chewy.git","ssh_url":"git@github.com:biow0lf/chewy.git","clone_url":"https://github.com/biow0lf/chewy.git","svn_url":"https://github.com/biow0lf/chewy","homepage":"","size":1526,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"toptal:master","ref":"master","sha":"d95580ec38bd14448b1d0ab621585f73bc13c567","user":{"login":"toptal","id":4004158,"avatar_url":"https://avatars.githubusercontent.com/u/4004158?v=3","gravatar_id":"","url":"https://api.github.com/users/toptal","html_url":"https://github.com/toptal","followers_url":"https://api.github.com/users/toptal/followers","following_url":"https://api.github.com/users/toptal/following{/other_user}","gists_url":"https://api.github.com/users/toptal/gists{/gist_id}","starred_url":"https://api.github.com/users/toptal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toptal/subscriptions","organizations_url":"https://api.github.com/users/toptal/orgs","repos_url":"https://api.github.com/users/toptal/repos","events_url":"https://api.github.com/users/toptal/events{/privacy}","received_events_url":"https://api.github.com/users/toptal/received_events","type":"Organization","site_admin":false},"repo":{"id":15042048,"name":"chewy","full_name":"toptal/chewy","owner":{"login":"toptal","id":4004158,"avatar_url":"https://avatars.githubusercontent.com/u/4004158?v=3","gravatar_id":"","url":"https://api.github.com/users/toptal","html_url":"https://github.com/toptal","followers_url":"https://api.github.com/users/toptal/followers","following_url":"https://api.github.com/users/toptal/following{/other_user}","gists_url":"https://api.github.com/users/toptal/gists{/gist_id}","starred_url":"https://api.github.com/users/toptal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toptal/subscriptions","organizations_url":"https://api.github.com/users/toptal/orgs","repos_url":"https://api.github.com/users/toptal/repos","events_url":"https://api.github.com/users/toptal/events{/privacy}","received_events_url":"https://api.github.com/users/toptal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/toptal/chewy","description":"High-level Elasticsearch Ruby framework based on the official elasticsearch-ruby client","fork":false,"url":"https://api.github.com/repos/toptal/chewy","forks_url":"https://api.github.com/repos/toptal/chewy/forks","keys_url":"https://api.github.com/repos/toptal/chewy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/toptal/chewy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/toptal/chewy/teams","hooks_url":"https://api.github.com/repos/toptal/chewy/hooks","issue_events_url":"https://api.github.com/repos/toptal/chewy/issues/events{/number}","events_url":"https://api.github.com/repos/toptal/chewy/events","assignees_url":"https://api.github.com/repos/toptal/chewy/assignees{/user}","branches_url":"https://api.github.com/repos/toptal/chewy/branches{/branch}","tags_url":"https://api.github.com/repos/toptal/chewy/tags","blobs_url":"https://api.github.com/repos/toptal/chewy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/toptal/chewy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/toptal/chewy/git/refs{/sha}","trees_url":"https://api.github.com/repos/toptal/chewy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/toptal/chewy/statuses/{sha}","languages_url":"https://api.github.com/repos/toptal/chewy/languages","stargazers_url":"https://api.github.com/repos/toptal/chewy/stargazers","contributors_url":"https://api.github.com/repos/toptal/chewy/contributors","subscribers_url":"https://api.github.com/repos/toptal/chewy/subscribers","subscription_url":"https://api.github.com/repos/toptal/chewy/subscription","commits_url":"https://api.github.com/repos/toptal/chewy/commits{/sha}","git_commits_url":"https://api.github.com/repos/toptal/chewy/git/commits{/sha}","comments_url":"https://api.github.com/repos/toptal/chewy/comments{/number}","issue_comment_url":"https://api.github.com/repos/toptal/chewy/issues/comments{/number}","contents_url":"https://api.github.com/repos/toptal/chewy/contents/{+path}","compare_url":"https://api.github.com/repos/toptal/chewy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/toptal/chewy/merges","archive_url":"https://api.github.com/repos/toptal/chewy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/toptal/chewy/downloads","issues_url":"https://api.github.com/repos/toptal/chewy/issues{/number}","pulls_url":"https://api.github.com/repos/toptal/chewy/pulls{/number}","milestones_url":"https://api.github.com/repos/toptal/chewy/milestones{/number}","notifications_url":"https://api.github.com/repos/toptal/chewy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/toptal/chewy/labels{/name}","releases_url":"https://api.github.com/repos/toptal/chewy/releases{/id}","created_at":"2013-12-09T08:33:03Z","updated_at":"2015-09-08T10:42:54Z","pushed_at":"2015-09-09T13:32:34Z","git_url":"git://github.com/toptal/chewy.git","ssh_url":"git@github.com:toptal/chewy.git","clone_url":"https://github.com/toptal/chewy.git","svn_url":"https://github.com/toptal/chewy","homepage":"","size":3255,"stargazers_count":572,"watchers_count":572,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":92,"mirror_url":null,"open_issues_count":29,"forks":92,"open_issues":29,"watchers":572,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/toptal/chewy/pulls/247"},"html":{"href":"https://github.com/toptal/chewy/pull/247"},"issue":{"href":"https://api.github.com/repos/toptal/chewy/issues/247"},"comments":{"href":"https://api.github.com/repos/toptal/chewy/issues/247/comments"},"review_comments":{"href":"https://api.github.com/repos/toptal/chewy/pulls/247/comments"},"review_comment":{"href":"https://api.github.com/repos/toptal/chewy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/toptal/chewy/pulls/247/commits"},"statuses":{"href":"https://api.github.com/repos/toptal/chewy/statuses/98dcd1a220dbc568138ed88d8e9cdd2742429677"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}