{"action":"created","comment":{"url":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/comments/63009980","id":63009980,"diff_hunk":"@@ -213,13 +213,30 @@ public function addDocument($entity)\n     /**\n      * @param MetaInformationInterface $metaInformation\n      * @param object                   $entity\n+     * @param array                    $changeSet\n      *\n      * @return boolean\n      *\n      * @throws \\BadMethodCallException if callback method not exists\n      */\n-    private function addToIndex(MetaInformationInterface $metaInformation, $entity)\n+    private function addToIndex(MetaInformationInterface $metaInformation, $entity, $changeSet = array())\n     {\n+        if (count($changeSet) > 0) {","path":"Solr.php","position":13,"original_position":13,"commit_id":"7ec66e936c3ed3775a41fd2d6d7223cc7abd0ca9","original_commit_id":"24088219d72dd4809745bac12eec4d6c1376301b","user":{"login":"floriansemm","id":1059500,"avatar_url":"https://avatars.githubusercontent.com/u/1059500?v=3","gravatar_id":"","url":"https://api.github.com/users/floriansemm","html_url":"https://github.com/floriansemm","followers_url":"https://api.github.com/users/floriansemm/followers","following_url":"https://api.github.com/users/floriansemm/following{/other_user}","gists_url":"https://api.github.com/users/floriansemm/gists{/gist_id}","starred_url":"https://api.github.com/users/floriansemm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floriansemm/subscriptions","organizations_url":"https://api.github.com/users/floriansemm/orgs","repos_url":"https://api.github.com/users/floriansemm/repos","events_url":"https://api.github.com/users/floriansemm/events{/privacy}","received_events_url":"https://api.github.com/users/floriansemm/received_events","type":"User","site_admin":false},"body":"Invert this if-statement to a guard if-statement\r\nE.g.:\r\n```php\r\nif (count($changeSet) === 0) {return false;}\r\n```","created_at":"2016-05-12T12:20:03Z","updated_at":"2016-05-12T12:20:03Z","html_url":"https://github.com/floriansemm/SolrBundle/pull/122#discussion_r63009980","pull_request_url":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/122","_links":{"self":{"href":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/comments/63009980"},"html":{"href":"https://github.com/floriansemm/SolrBundle/pull/122#discussion_r63009980"},"pull_request":{"href":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/122"}}},"pull_request":{"url":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/122","id":69818009,"html_url":"https://github.com/floriansemm/SolrBundle/pull/122","diff_url":"https://github.com/floriansemm/SolrBundle/pull/122.diff","patch_url":"https://github.com/floriansemm/SolrBundle/pull/122.patch","issue_url":"https://api.github.com/repos/floriansemm/SolrBundle/issues/122","number":122,"state":"open","locked":false,"title":"Feature/entity changeset","user":{"login":"PouleR","id":6999565,"avatar_url":"https://avatars.githubusercontent.com/u/6999565?v=3","gravatar_id":"","url":"https://api.github.com/users/PouleR","html_url":"https://github.com/PouleR","followers_url":"https://api.github.com/users/PouleR/followers","following_url":"https://api.github.com/users/PouleR/following{/other_user}","gists_url":"https://api.github.com/users/PouleR/gists{/gist_id}","starred_url":"https://api.github.com/users/PouleR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PouleR/subscriptions","organizations_url":"https://api.github.com/users/PouleR/orgs","repos_url":"https://api.github.com/users/PouleR/repos","events_url":"https://api.github.com/users/PouleR/events{/privacy}","received_events_url":"https://api.github.com/users/PouleR/received_events","type":"User","site_admin":false},"body":"Add functionality to check if a document needs to be updated (in Solr) by comparing the entity changeset and the solr fields in the entity. In other words; don't update in Solr when a property is changed that doesn't have a @Solr\\Field annotation.","created_at":"2016-05-12T11:07:34Z","updated_at":"2016-05-12T12:20:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa1dcb9c2e12cfccda4e5003a82f1baf943a5d33","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/122/commits","review_comments_url":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/122/comments","review_comment_url":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/floriansemm/SolrBundle/issues/122/comments","statuses_url":"https://api.github.com/repos/floriansemm/SolrBundle/statuses/7ec66e936c3ed3775a41fd2d6d7223cc7abd0ca9","head":{"label":"SpinninRecordsOfficial:feature/entity-changeset","ref":"feature/entity-changeset","sha":"7ec66e936c3ed3775a41fd2d6d7223cc7abd0ca9","user":{"login":"SpinninRecordsOfficial","id":15226655,"avatar_url":"https://avatars.githubusercontent.com/u/15226655?v=3","gravatar_id":"","url":"https://api.github.com/users/SpinninRecordsOfficial","html_url":"https://github.com/SpinninRecordsOfficial","followers_url":"https://api.github.com/users/SpinninRecordsOfficial/followers","following_url":"https://api.github.com/users/SpinninRecordsOfficial/following{/other_user}","gists_url":"https://api.github.com/users/SpinninRecordsOfficial/gists{/gist_id}","starred_url":"https://api.github.com/users/SpinninRecordsOfficial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpinninRecordsOfficial/subscriptions","organizations_url":"https://api.github.com/users/SpinninRecordsOfficial/orgs","repos_url":"https://api.github.com/users/SpinninRecordsOfficial/repos","events_url":"https://api.github.com/users/SpinninRecordsOfficial/events{/privacy}","received_events_url":"https://api.github.com/users/SpinninRecordsOfficial/received_events","type":"Organization","site_admin":false},"repo":{"id":57127879,"name":"SolrBundle","full_name":"SpinninRecordsOfficial/SolrBundle","owner":{"login":"SpinninRecordsOfficial","id":15226655,"avatar_url":"https://avatars.githubusercontent.com/u/15226655?v=3","gravatar_id":"","url":"https://api.github.com/users/SpinninRecordsOfficial","html_url":"https://github.com/SpinninRecordsOfficial","followers_url":"https://api.github.com/users/SpinninRecordsOfficial/followers","following_url":"https://api.github.com/users/SpinninRecordsOfficial/following{/other_user}","gists_url":"https://api.github.com/users/SpinninRecordsOfficial/gists{/gist_id}","starred_url":"https://api.github.com/users/SpinninRecordsOfficial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpinninRecordsOfficial/subscriptions","organizations_url":"https://api.github.com/users/SpinninRecordsOfficial/orgs","repos_url":"https://api.github.com/users/SpinninRecordsOfficial/repos","events_url":"https://api.github.com/users/SpinninRecordsOfficial/events{/privacy}","received_events_url":"https://api.github.com/users/SpinninRecordsOfficial/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpinninRecordsOfficial/SolrBundle","description":"Solr-Integration into Symfony2 and Doctrine2","fork":true,"url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle","forks_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/forks","keys_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/teams","hooks_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/hooks","issue_events_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/issues/events{/number}","events_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/events","assignees_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/assignees{/user}","branches_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/branches{/branch}","tags_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/tags","blobs_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/languages","stargazers_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/stargazers","contributors_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/contributors","subscribers_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/subscribers","subscription_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/subscription","commits_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/contents/{+path}","compare_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/merges","archive_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/downloads","issues_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/issues{/number}","pulls_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/labels{/name}","releases_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/releases{/id}","deployments_url":"https://api.github.com/repos/SpinninRecordsOfficial/SolrBundle/deployments","created_at":"2016-04-26T12:52:36Z","updated_at":"2016-04-26T12:52:37Z","pushed_at":"2016-05-11T12:27:24Z","git_url":"git://github.com/SpinninRecordsOfficial/SolrBundle.git","ssh_url":"git@github.com:SpinninRecordsOfficial/SolrBundle.git","clone_url":"https://github.com/SpinninRecordsOfficial/SolrBundle.git","svn_url":"https://github.com/SpinninRecordsOfficial/SolrBundle","homepage":"http://floriansemm.github.io/SolrBundle","size":1044,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"master"}},"base":{"label":"floriansemm:master","ref":"master","sha":"b75a8789f39d6da9dfd7ddb467c3dfada82fcb8e","user":{"login":"floriansemm","id":1059500,"avatar_url":"https://avatars.githubusercontent.com/u/1059500?v=3","gravatar_id":"","url":"https://api.github.com/users/floriansemm","html_url":"https://github.com/floriansemm","followers_url":"https://api.github.com/users/floriansemm/followers","following_url":"https://api.github.com/users/floriansemm/following{/other_user}","gists_url":"https://api.github.com/users/floriansemm/gists{/gist_id}","starred_url":"https://api.github.com/users/floriansemm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floriansemm/subscriptions","organizations_url":"https://api.github.com/users/floriansemm/orgs","repos_url":"https://api.github.com/users/floriansemm/repos","events_url":"https://api.github.com/users/floriansemm/events{/privacy}","received_events_url":"https://api.github.com/users/floriansemm/received_events","type":"User","site_admin":false},"repo":{"id":3206559,"name":"SolrBundle","full_name":"floriansemm/SolrBundle","owner":{"login":"floriansemm","id":1059500,"avatar_url":"https://avatars.githubusercontent.com/u/1059500?v=3","gravatar_id":"","url":"https://api.github.com/users/floriansemm","html_url":"https://github.com/floriansemm","followers_url":"https://api.github.com/users/floriansemm/followers","following_url":"https://api.github.com/users/floriansemm/following{/other_user}","gists_url":"https://api.github.com/users/floriansemm/gists{/gist_id}","starred_url":"https://api.github.com/users/floriansemm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floriansemm/subscriptions","organizations_url":"https://api.github.com/users/floriansemm/orgs","repos_url":"https://api.github.com/users/floriansemm/repos","events_url":"https://api.github.com/users/floriansemm/events{/privacy}","received_events_url":"https://api.github.com/users/floriansemm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/floriansemm/SolrBundle","description":"Solr-Integration into Symfony2 and Doctrine2","fork":false,"url":"https://api.github.com/repos/floriansemm/SolrBundle","forks_url":"https://api.github.com/repos/floriansemm/SolrBundle/forks","keys_url":"https://api.github.com/repos/floriansemm/SolrBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/floriansemm/SolrBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/floriansemm/SolrBundle/teams","hooks_url":"https://api.github.com/repos/floriansemm/SolrBundle/hooks","issue_events_url":"https://api.github.com/repos/floriansemm/SolrBundle/issues/events{/number}","events_url":"https://api.github.com/repos/floriansemm/SolrBundle/events","assignees_url":"https://api.github.com/repos/floriansemm/SolrBundle/assignees{/user}","branches_url":"https://api.github.com/repos/floriansemm/SolrBundle/branches{/branch}","tags_url":"https://api.github.com/repos/floriansemm/SolrBundle/tags","blobs_url":"https://api.github.com/repos/floriansemm/SolrBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/floriansemm/SolrBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/floriansemm/SolrBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/floriansemm/SolrBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/floriansemm/SolrBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/floriansemm/SolrBundle/languages","stargazers_url":"https://api.github.com/repos/floriansemm/SolrBundle/stargazers","contributors_url":"https://api.github.com/repos/floriansemm/SolrBundle/contributors","subscribers_url":"https://api.github.com/repos/floriansemm/SolrBundle/subscribers","subscription_url":"https://api.github.com/repos/floriansemm/SolrBundle/subscription","commits_url":"https://api.github.com/repos/floriansemm/SolrBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/floriansemm/SolrBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/floriansemm/SolrBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/floriansemm/SolrBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/floriansemm/SolrBundle/contents/{+path}","compare_url":"https://api.github.com/repos/floriansemm/SolrBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/floriansemm/SolrBundle/merges","archive_url":"https://api.github.com/repos/floriansemm/SolrBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/floriansemm/SolrBundle/downloads","issues_url":"https://api.github.com/repos/floriansemm/SolrBundle/issues{/number}","pulls_url":"https://api.github.com/repos/floriansemm/SolrBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/floriansemm/SolrBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/floriansemm/SolrBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/floriansemm/SolrBundle/labels{/name}","releases_url":"https://api.github.com/repos/floriansemm/SolrBundle/releases{/id}","deployments_url":"https://api.github.com/repos/floriansemm/SolrBundle/deployments","created_at":"2012-01-18T06:37:18Z","updated_at":"2016-05-03T07:49:12Z","pushed_at":"2016-05-12T11:07:35Z","git_url":"git://github.com/floriansemm/SolrBundle.git","ssh_url":"git@github.com:floriansemm/SolrBundle.git","clone_url":"https://github.com/floriansemm/SolrBundle.git","svn_url":"https://github.com/floriansemm/SolrBundle","homepage":"http://floriansemm.github.io/SolrBundle","size":1120,"stargazers_count":83,"watchers_count":83,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":52,"mirror_url":null,"open_issues_count":2,"forks":52,"open_issues":2,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/122"},"html":{"href":"https://github.com/floriansemm/SolrBundle/pull/122"},"issue":{"href":"https://api.github.com/repos/floriansemm/SolrBundle/issues/122"},"comments":{"href":"https://api.github.com/repos/floriansemm/SolrBundle/issues/122/comments"},"review_comments":{"href":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/122/comments"},"review_comment":{"href":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/floriansemm/SolrBundle/pulls/122/commits"},"statuses":{"href":"https://api.github.com/repos/floriansemm/SolrBundle/statuses/7ec66e936c3ed3775a41fd2d6d7223cc7abd0ca9"}}}}