{"action":"created","comment":{"url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/comments/31139001","id":31139001,"diff_hunk":"@@ -148,6 +153,23 @@ public function isSmart(AdminInterface $admin, array $values = array())\n             }\n \n             if (!in_array($key, $mappedFieldNames)) {\n+                /*\n+                 * We are in the case where a field is used as filter\n+                 * without being mapped in elastic search.\n+                 * An ugly case would be to have a custom field used in the filter","path":"Builder/ElasticaDatagridBuilder.php","position":78,"original_position":78,"commit_id":"b4677180ee46b19ccf22744eb2cf8ad2e1df99c7","original_commit_id":"b4677180ee46b19ccf22744eb2cf8ad2e1df99c7","user":{"login":"chervaliery","id":10849551,"avatar_url":"https://avatars.githubusercontent.com/u/10849551?v=3","gravatar_id":"","url":"https://api.github.com/users/chervaliery","html_url":"https://github.com/chervaliery","followers_url":"https://api.github.com/users/chervaliery/followers","following_url":"https://api.github.com/users/chervaliery/following{/other_user}","gists_url":"https://api.github.com/users/chervaliery/gists{/gist_id}","starred_url":"https://api.github.com/users/chervaliery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chervaliery/subscriptions","organizations_url":"https://api.github.com/users/chervaliery/orgs","repos_url":"https://api.github.com/users/chervaliery/repos","events_url":"https://api.github.com/users/chervaliery/events{/privacy}","received_events_url":"https://api.github.com/users/chervaliery/received_events","type":"User","site_admin":false},"body":"It's the case where you define a field in a filter that is not mapped in ElasticSearch but neither in the model manager.","created_at":"2015-05-27T14:31:05Z","updated_at":"2015-05-27T14:31:05Z","html_url":"https://github.com/sonata-project/SonataAdminSearchBundle/pull/14#discussion_r31139001","pull_request_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/comments/31139001"},"html":{"href":"https://github.com/sonata-project/SonataAdminSearchBundle/pull/14#discussion_r31139001"},"pull_request":{"href":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/14","id":36306126,"html_url":"https://github.com/sonata-project/SonataAdminSearchBundle/pull/14","diff_url":"https://github.com/sonata-project/SonataAdminSearchBundle/pull/14.diff","patch_url":"https://github.com/sonata-project/SonataAdminSearchBundle/pull/14.patch","issue_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/issues/14","number":14,"state":"open","locked":false,"title":"Implement the createQuery overriding","user":{"login":"chervaliery","id":10849551,"avatar_url":"https://avatars.githubusercontent.com/u/10849551?v=3","gravatar_id":"","url":"https://api.github.com/users/chervaliery","html_url":"https://github.com/chervaliery","followers_url":"https://api.github.com/users/chervaliery/followers","following_url":"https://api.github.com/users/chervaliery/following{/other_user}","gists_url":"https://api.github.com/users/chervaliery/gists{/gist_id}","starred_url":"https://api.github.com/users/chervaliery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chervaliery/subscriptions","organizations_url":"https://api.github.com/users/chervaliery/orgs","repos_url":"https://api.github.com/users/chervaliery/repos","events_url":"https://api.github.com/users/chervaliery/events{/privacy}","received_events_url":"https://api.github.com/users/chervaliery/received_events","type":"User","site_admin":false},"body":"The proxyQuery passed to the Datagrid was hard coded. Here, it check if the createQuery is overridden by the user and return an ElasticaProxyQuery and if it’s a smart query. Else, the original model manager is used instead of ElasticSearch.","created_at":"2015-05-27T13:57:36Z","updated_at":"2015-05-27T14:31:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3fc2242f6d6bcad2350c8f95f67e584045ba5f6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/14/commits","review_comments_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/14/comments","review_comment_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/issues/14/comments","statuses_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/statuses/b4677180ee46b19ccf22744eb2cf8ad2e1df99c7","head":{"label":"chervaliery:createQuery","ref":"createQuery","sha":"b4677180ee46b19ccf22744eb2cf8ad2e1df99c7","user":{"login":"chervaliery","id":10849551,"avatar_url":"https://avatars.githubusercontent.com/u/10849551?v=3","gravatar_id":"","url":"https://api.github.com/users/chervaliery","html_url":"https://github.com/chervaliery","followers_url":"https://api.github.com/users/chervaliery/followers","following_url":"https://api.github.com/users/chervaliery/following{/other_user}","gists_url":"https://api.github.com/users/chervaliery/gists{/gist_id}","starred_url":"https://api.github.com/users/chervaliery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chervaliery/subscriptions","organizations_url":"https://api.github.com/users/chervaliery/orgs","repos_url":"https://api.github.com/users/chervaliery/repos","events_url":"https://api.github.com/users/chervaliery/events{/privacy}","received_events_url":"https://api.github.com/users/chervaliery/received_events","type":"User","site_admin":false},"repo":{"id":35410320,"name":"SonataAdminSearchBundle","full_name":"chervaliery/SonataAdminSearchBundle","owner":{"login":"chervaliery","id":10849551,"avatar_url":"https://avatars.githubusercontent.com/u/10849551?v=3","gravatar_id":"","url":"https://api.github.com/users/chervaliery","html_url":"https://github.com/chervaliery","followers_url":"https://api.github.com/users/chervaliery/followers","following_url":"https://api.github.com/users/chervaliery/following{/other_user}","gists_url":"https://api.github.com/users/chervaliery/gists{/gist_id}","starred_url":"https://api.github.com/users/chervaliery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chervaliery/subscriptions","organizations_url":"https://api.github.com/users/chervaliery/orgs","repos_url":"https://api.github.com/users/chervaliery/repos","events_url":"https://api.github.com/users/chervaliery/events{/privacy}","received_events_url":"https://api.github.com/users/chervaliery/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chervaliery/SonataAdminSearchBundle","description":"POC - Implement Search Engine (ElasticSearch) inside Sonata Admin","fork":true,"url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle","forks_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/forks","keys_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/teams","hooks_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/hooks","issue_events_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/issues/events{/number}","events_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/events","assignees_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/assignees{/user}","branches_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/branches{/branch}","tags_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/tags","blobs_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/languages","stargazers_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/stargazers","contributors_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/contributors","subscribers_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/subscribers","subscription_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/subscription","commits_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/contents/{+path}","compare_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/merges","archive_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/downloads","issues_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/issues{/number}","pulls_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/labels{/name}","releases_url":"https://api.github.com/repos/chervaliery/SonataAdminSearchBundle/releases{/id}","created_at":"2015-05-11T08:03:02Z","updated_at":"2015-05-11T08:03:03Z","pushed_at":"2015-05-27T13:53:27Z","git_url":"git://github.com/chervaliery/SonataAdminSearchBundle.git","ssh_url":"git@github.com:chervaliery/SonataAdminSearchBundle.git","clone_url":"https://github.com/chervaliery/SonataAdminSearchBundle.git","svn_url":"https://github.com/chervaliery/SonataAdminSearchBundle","homepage":null,"size":176,"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":"sonata-project:master","ref":"master","sha":"bca1c6c9622ae934051f9d7db392a808a7f79bf0","user":{"login":"sonata-project","id":404157,"avatar_url":"https://avatars.githubusercontent.com/u/404157?v=3","gravatar_id":"","url":"https://api.github.com/users/sonata-project","html_url":"https://github.com/sonata-project","followers_url":"https://api.github.com/users/sonata-project/followers","following_url":"https://api.github.com/users/sonata-project/following{/other_user}","gists_url":"https://api.github.com/users/sonata-project/gists{/gist_id}","starred_url":"https://api.github.com/users/sonata-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonata-project/subscriptions","organizations_url":"https://api.github.com/users/sonata-project/orgs","repos_url":"https://api.github.com/users/sonata-project/repos","events_url":"https://api.github.com/users/sonata-project/events{/privacy}","received_events_url":"https://api.github.com/users/sonata-project/received_events","type":"Organization","site_admin":false},"repo":{"id":27479344,"name":"SonataAdminSearchBundle","full_name":"sonata-project/SonataAdminSearchBundle","owner":{"login":"sonata-project","id":404157,"avatar_url":"https://avatars.githubusercontent.com/u/404157?v=3","gravatar_id":"","url":"https://api.github.com/users/sonata-project","html_url":"https://github.com/sonata-project","followers_url":"https://api.github.com/users/sonata-project/followers","following_url":"https://api.github.com/users/sonata-project/following{/other_user}","gists_url":"https://api.github.com/users/sonata-project/gists{/gist_id}","starred_url":"https://api.github.com/users/sonata-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonata-project/subscriptions","organizations_url":"https://api.github.com/users/sonata-project/orgs","repos_url":"https://api.github.com/users/sonata-project/repos","events_url":"https://api.github.com/users/sonata-project/events{/privacy}","received_events_url":"https://api.github.com/users/sonata-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonata-project/SonataAdminSearchBundle","description":"POC - Implement Search Engine (ElasticSearch) inside Sonata Admin","fork":false,"url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle","forks_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/forks","keys_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/teams","hooks_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/hooks","issue_events_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/issues/events{/number}","events_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/events","assignees_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/assignees{/user}","branches_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/branches{/branch}","tags_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/tags","blobs_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/languages","stargazers_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/stargazers","contributors_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/contributors","subscribers_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/subscribers","subscription_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/subscription","commits_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/contents/{+path}","compare_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/merges","archive_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/downloads","issues_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/issues{/number}","pulls_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/labels{/name}","releases_url":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/releases{/id}","created_at":"2014-12-03T09:26:15Z","updated_at":"2015-05-08T18:53:05Z","pushed_at":"2015-05-27T13:57:38Z","git_url":"git://github.com/sonata-project/SonataAdminSearchBundle.git","ssh_url":"git@github.com:sonata-project/SonataAdminSearchBundle.git","clone_url":"https://github.com/sonata-project/SonataAdminSearchBundle.git","svn_url":"https://github.com/sonata-project/SonataAdminSearchBundle","homepage":null,"size":481,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/14"},"html":{"href":"https://github.com/sonata-project/SonataAdminSearchBundle/pull/14"},"issue":{"href":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/issues/14"},"comments":{"href":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/sonata-project/SonataAdminSearchBundle/statuses/b4677180ee46b19ccf22744eb2cf8ad2e1df99c7"}}}}