{"action":"created","comment":{"url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/comments/28252519","id":28252519,"diff_hunk":"@@ -0,0 +1,38 @@\n+/*\n+ * Hibernate Search, full-text search for your domain model\n+ *\n+ * License: GNU Lesser General Public License (LGPL), version 2.1 or later\n+ * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.\n+ */\n+package org.hibernate.search.backend.impl;\n+\n+import org.apache.lucene.search.Query;\n+import org.hibernate.search.backend.DeletionQuery;\n+import org.hibernate.search.util.impl.ScopedAnalyzer;\n+\n+/**\n+ * @author Martin Braun\n+ */\n+public interface DeletionQueryMapper {\n+\n+\tQuery toLuceneQuery(DeletionQuery deletionQuery, ScopedAnalyzer analyzerForEntity);","path":"engine/src/main/java/org/hibernate/search/backend/impl/DeletionQueryMapper.java","position":18,"original_position":18,"commit_id":"d2595a8bc6d96b0df8b5c6f012852f4dc99a8d5c","original_commit_id":"d2595a8bc6d96b0df8b5c6f012852f4dc99a8d5c","user":{"login":"gunnarmorling","id":28612,"avatar_url":"https://avatars.githubusercontent.com/u/28612?v=3","gravatar_id":"","url":"https://api.github.com/users/gunnarmorling","html_url":"https://github.com/gunnarmorling","followers_url":"https://api.github.com/users/gunnarmorling/followers","following_url":"https://api.github.com/users/gunnarmorling/following{/other_user}","gists_url":"https://api.github.com/users/gunnarmorling/gists{/gist_id}","starred_url":"https://api.github.com/users/gunnarmorling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunnarmorling/subscriptions","organizations_url":"https://api.github.com/users/gunnarmorling/orgs","repos_url":"https://api.github.com/users/gunnarmorling/repos","events_url":"https://api.github.com/users/gunnarmorling/events{/privacy}","received_events_url":"https://api.github.com/users/gunnarmorling/received_events","type":"User","site_admin":false},"body":"Have you considered to move `toLuceneQuery()` and `toString()` to `DeletionQuery` itself? That way you'd save one interaction (map look-up or similar) when you have the `DeletionQuery` instance in your hands already. The support-class (or \"factory\") would only be needed during de-serialization then.","created_at":"2015-04-13T16:14:05Z","updated_at":"2015-04-13T16:14:05Z","html_url":"https://github.com/hibernate/hibernate-search/pull/816#discussion_r28252519","pull_request_url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/816","_links":{"self":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/comments/28252519"},"html":{"href":"https://github.com/hibernate/hibernate-search/pull/816#discussion_r28252519"},"pull_request":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/816"}}},"pull_request":{"url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/816","id":33164247,"html_url":"https://github.com/hibernate/hibernate-search/pull/816","diff_url":"https://github.com/hibernate/hibernate-search/pull/816.diff","patch_url":"https://github.com/hibernate/hibernate-search/pull/816.patch","issue_url":"https://api.github.com/repos/hibernate/hibernate-search/issues/816","number":816,"state":"open","locked":false,"title":"HSEARCH-1841 Refactor DeleteByQuerySupport","user":{"login":"s4ke","id":719760,"avatar_url":"https://avatars.githubusercontent.com/u/719760?v=3","gravatar_id":"","url":"https://api.github.com/users/s4ke","html_url":"https://github.com/s4ke","followers_url":"https://api.github.com/users/s4ke/followers","following_url":"https://api.github.com/users/s4ke/following{/other_user}","gists_url":"https://api.github.com/users/s4ke/gists{/gist_id}","starred_url":"https://api.github.com/users/s4ke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s4ke/subscriptions","organizations_url":"https://api.github.com/users/s4ke/orgs","repos_url":"https://api.github.com/users/s4ke/repos","events_url":"https://api.github.com/users/s4ke/events{/privacy}","received_events_url":"https://api.github.com/users/s4ke/received_events","type":"User","site_admin":false},"body":"DeleteByQuerySupport has slimmed down.\r\n\r\nInstead of having 3 different interfaces, I have merged the toString(), fromString() and toLuceneQuery() logic into \"DeletionQueryMapper\".\r\n\r\nFurthermore, DeleteByQuerySupport now doesn't host the converting logic anymore. It's just used to redirect to the correct DeletionQueryMapper.\r\n\r\nAll DeletionQueries are now required to have a corresponding DeletionQueryMapper.","created_at":"2015-04-13T13:41:10Z","updated_at":"2015-04-13T16:14:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c5777c5cb0f25bf7d814573f593151fd3ec6a23","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/816/commits","review_comments_url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/816/comments","review_comment_url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hibernate/hibernate-search/issues/816/comments","statuses_url":"https://api.github.com/repos/hibernate/hibernate-search/statuses/d2595a8bc6d96b0df8b5c6f012852f4dc99a8d5c","head":{"label":"s4ke:HSEARCH-1841","ref":"HSEARCH-1841","sha":"d2595a8bc6d96b0df8b5c6f012852f4dc99a8d5c","user":{"login":"s4ke","id":719760,"avatar_url":"https://avatars.githubusercontent.com/u/719760?v=3","gravatar_id":"","url":"https://api.github.com/users/s4ke","html_url":"https://github.com/s4ke","followers_url":"https://api.github.com/users/s4ke/followers","following_url":"https://api.github.com/users/s4ke/following{/other_user}","gists_url":"https://api.github.com/users/s4ke/gists{/gist_id}","starred_url":"https://api.github.com/users/s4ke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s4ke/subscriptions","organizations_url":"https://api.github.com/users/s4ke/orgs","repos_url":"https://api.github.com/users/s4ke/repos","events_url":"https://api.github.com/users/s4ke/events{/privacy}","received_events_url":"https://api.github.com/users/s4ke/received_events","type":"User","site_admin":false},"repo":{"id":16588546,"name":"hibernate-search","full_name":"s4ke/hibernate-search","owner":{"login":"s4ke","id":719760,"avatar_url":"https://avatars.githubusercontent.com/u/719760?v=3","gravatar_id":"","url":"https://api.github.com/users/s4ke","html_url":"https://github.com/s4ke","followers_url":"https://api.github.com/users/s4ke/followers","following_url":"https://api.github.com/users/s4ke/following{/other_user}","gists_url":"https://api.github.com/users/s4ke/gists{/gist_id}","starred_url":"https://api.github.com/users/s4ke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s4ke/subscriptions","organizations_url":"https://api.github.com/users/s4ke/orgs","repos_url":"https://api.github.com/users/s4ke/repos","events_url":"https://api.github.com/users/s4ke/events{/privacy}","received_events_url":"https://api.github.com/users/s4ke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/s4ke/hibernate-search","description":"Hibernate Search: full-text search for domain model","fork":true,"url":"https://api.github.com/repos/s4ke/hibernate-search","forks_url":"https://api.github.com/repos/s4ke/hibernate-search/forks","keys_url":"https://api.github.com/repos/s4ke/hibernate-search/keys{/key_id}","collaborators_url":"https://api.github.com/repos/s4ke/hibernate-search/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/s4ke/hibernate-search/teams","hooks_url":"https://api.github.com/repos/s4ke/hibernate-search/hooks","issue_events_url":"https://api.github.com/repos/s4ke/hibernate-search/issues/events{/number}","events_url":"https://api.github.com/repos/s4ke/hibernate-search/events","assignees_url":"https://api.github.com/repos/s4ke/hibernate-search/assignees{/user}","branches_url":"https://api.github.com/repos/s4ke/hibernate-search/branches{/branch}","tags_url":"https://api.github.com/repos/s4ke/hibernate-search/tags","blobs_url":"https://api.github.com/repos/s4ke/hibernate-search/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/s4ke/hibernate-search/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/s4ke/hibernate-search/git/refs{/sha}","trees_url":"https://api.github.com/repos/s4ke/hibernate-search/git/trees{/sha}","statuses_url":"https://api.github.com/repos/s4ke/hibernate-search/statuses/{sha}","languages_url":"https://api.github.com/repos/s4ke/hibernate-search/languages","stargazers_url":"https://api.github.com/repos/s4ke/hibernate-search/stargazers","contributors_url":"https://api.github.com/repos/s4ke/hibernate-search/contributors","subscribers_url":"https://api.github.com/repos/s4ke/hibernate-search/subscribers","subscription_url":"https://api.github.com/repos/s4ke/hibernate-search/subscription","commits_url":"https://api.github.com/repos/s4ke/hibernate-search/commits{/sha}","git_commits_url":"https://api.github.com/repos/s4ke/hibernate-search/git/commits{/sha}","comments_url":"https://api.github.com/repos/s4ke/hibernate-search/comments{/number}","issue_comment_url":"https://api.github.com/repos/s4ke/hibernate-search/issues/comments{/number}","contents_url":"https://api.github.com/repos/s4ke/hibernate-search/contents/{+path}","compare_url":"https://api.github.com/repos/s4ke/hibernate-search/compare/{base}...{head}","merges_url":"https://api.github.com/repos/s4ke/hibernate-search/merges","archive_url":"https://api.github.com/repos/s4ke/hibernate-search/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/s4ke/hibernate-search/downloads","issues_url":"https://api.github.com/repos/s4ke/hibernate-search/issues{/number}","pulls_url":"https://api.github.com/repos/s4ke/hibernate-search/pulls{/number}","milestones_url":"https://api.github.com/repos/s4ke/hibernate-search/milestones{/number}","notifications_url":"https://api.github.com/repos/s4ke/hibernate-search/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/s4ke/hibernate-search/labels{/name}","releases_url":"https://api.github.com/repos/s4ke/hibernate-search/releases{/id}","created_at":"2014-02-06T18:10:49Z","updated_at":"2015-04-13T12:59:21Z","pushed_at":"2015-04-13T14:27:59Z","git_url":"git://github.com/s4ke/hibernate-search.git","ssh_url":"git@github.com:s4ke/hibernate-search.git","clone_url":"https://github.com/s4ke/hibernate-search.git","svn_url":"https://github.com/s4ke/hibernate-search","homepage":"http://search.hibernate.org","size":42170,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"hibernate:master","ref":"master","sha":"991e481f282aebb3d343ab36edb64555c1ebea38","user":{"login":"hibernate","id":348262,"avatar_url":"https://avatars.githubusercontent.com/u/348262?v=3","gravatar_id":"","url":"https://api.github.com/users/hibernate","html_url":"https://github.com/hibernate","followers_url":"https://api.github.com/users/hibernate/followers","following_url":"https://api.github.com/users/hibernate/following{/other_user}","gists_url":"https://api.github.com/users/hibernate/gists{/gist_id}","starred_url":"https://api.github.com/users/hibernate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hibernate/subscriptions","organizations_url":"https://api.github.com/users/hibernate/orgs","repos_url":"https://api.github.com/users/hibernate/repos","events_url":"https://api.github.com/users/hibernate/events{/privacy}","received_events_url":"https://api.github.com/users/hibernate/received_events","type":"Organization","site_admin":false},"repo":{"id":990281,"name":"hibernate-search","full_name":"hibernate/hibernate-search","owner":{"login":"hibernate","id":348262,"avatar_url":"https://avatars.githubusercontent.com/u/348262?v=3","gravatar_id":"","url":"https://api.github.com/users/hibernate","html_url":"https://github.com/hibernate","followers_url":"https://api.github.com/users/hibernate/followers","following_url":"https://api.github.com/users/hibernate/following{/other_user}","gists_url":"https://api.github.com/users/hibernate/gists{/gist_id}","starred_url":"https://api.github.com/users/hibernate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hibernate/subscriptions","organizations_url":"https://api.github.com/users/hibernate/orgs","repos_url":"https://api.github.com/users/hibernate/repos","events_url":"https://api.github.com/users/hibernate/events{/privacy}","received_events_url":"https://api.github.com/users/hibernate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hibernate/hibernate-search","description":"Hibernate Search: full-text search for domain model","fork":false,"url":"https://api.github.com/repos/hibernate/hibernate-search","forks_url":"https://api.github.com/repos/hibernate/hibernate-search/forks","keys_url":"https://api.github.com/repos/hibernate/hibernate-search/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hibernate/hibernate-search/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hibernate/hibernate-search/teams","hooks_url":"https://api.github.com/repos/hibernate/hibernate-search/hooks","issue_events_url":"https://api.github.com/repos/hibernate/hibernate-search/issues/events{/number}","events_url":"https://api.github.com/repos/hibernate/hibernate-search/events","assignees_url":"https://api.github.com/repos/hibernate/hibernate-search/assignees{/user}","branches_url":"https://api.github.com/repos/hibernate/hibernate-search/branches{/branch}","tags_url":"https://api.github.com/repos/hibernate/hibernate-search/tags","blobs_url":"https://api.github.com/repos/hibernate/hibernate-search/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hibernate/hibernate-search/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hibernate/hibernate-search/git/refs{/sha}","trees_url":"https://api.github.com/repos/hibernate/hibernate-search/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hibernate/hibernate-search/statuses/{sha}","languages_url":"https://api.github.com/repos/hibernate/hibernate-search/languages","stargazers_url":"https://api.github.com/repos/hibernate/hibernate-search/stargazers","contributors_url":"https://api.github.com/repos/hibernate/hibernate-search/contributors","subscribers_url":"https://api.github.com/repos/hibernate/hibernate-search/subscribers","subscription_url":"https://api.github.com/repos/hibernate/hibernate-search/subscription","commits_url":"https://api.github.com/repos/hibernate/hibernate-search/commits{/sha}","git_commits_url":"https://api.github.com/repos/hibernate/hibernate-search/git/commits{/sha}","comments_url":"https://api.github.com/repos/hibernate/hibernate-search/comments{/number}","issue_comment_url":"https://api.github.com/repos/hibernate/hibernate-search/issues/comments{/number}","contents_url":"https://api.github.com/repos/hibernate/hibernate-search/contents/{+path}","compare_url":"https://api.github.com/repos/hibernate/hibernate-search/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hibernate/hibernate-search/merges","archive_url":"https://api.github.com/repos/hibernate/hibernate-search/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hibernate/hibernate-search/downloads","issues_url":"https://api.github.com/repos/hibernate/hibernate-search/issues{/number}","pulls_url":"https://api.github.com/repos/hibernate/hibernate-search/pulls{/number}","milestones_url":"https://api.github.com/repos/hibernate/hibernate-search/milestones{/number}","notifications_url":"https://api.github.com/repos/hibernate/hibernate-search/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hibernate/hibernate-search/labels{/name}","releases_url":"https://api.github.com/repos/hibernate/hibernate-search/releases{/id}","created_at":"2010-10-15T15:55:09Z","updated_at":"2015-04-13T11:55:08Z","pushed_at":"2015-04-13T14:28:00Z","git_url":"git://github.com/hibernate/hibernate-search.git","ssh_url":"git@github.com:hibernate/hibernate-search.git","clone_url":"https://github.com/hibernate/hibernate-search.git","svn_url":"https://github.com/hibernate/hibernate-search","homepage":"http://search.hibernate.org","size":63113,"stargazers_count":140,"watchers_count":140,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":6,"forks":104,"open_issues":6,"watchers":140,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/816"},"html":{"href":"https://github.com/hibernate/hibernate-search/pull/816"},"issue":{"href":"https://api.github.com/repos/hibernate/hibernate-search/issues/816"},"comments":{"href":"https://api.github.com/repos/hibernate/hibernate-search/issues/816/comments"},"review_comments":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/816/comments"},"review_comment":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/816/commits"},"statuses":{"href":"https://api.github.com/repos/hibernate/hibernate-search/statuses/d2595a8bc6d96b0df8b5c6f012852f4dc99a8d5c"}}}}