{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/77704113","id":77704113,"diff_hunk":"@@ -0,0 +1,63 @@\n+/*\n+ * Licensed to Elasticsearch under one or more contributor\n+ * license agreements. See the NOTICE file distributed with\n+ * this work for additional information regarding copyright\n+ * ownership. Elasticsearch licenses this file to you under\n+ * the Apache License, Version 2.0 (the \"License\"); you may\n+ * not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+package org.elasticsearch.index.analysis;\n+\n+import org.apache.lucene.analysis.TokenStream;\n+import org.apache.lucene.analysis.minhash.MinHashFilter;\n+import org.apache.lucene.analysis.minhash.MinHashFilterFactory;\n+import org.elasticsearch.common.settings.Settings;\n+import org.elasticsearch.env.Environment;\n+import org.elasticsearch.index.IndexSettings;\n+\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+\n+public class MinHashTokenFilterFactory extends AbstractTokenFilterFactory {\n+    private MinHashFilterFactory luceneFactory;","path":"core/src/main/java/org/elasticsearch/index/analysis/MinHashTokenFilterFactory.java","position":34,"original_position":34,"commit_id":"72ca0770a17f6c1850c1a938c0c5eca1a6dc3109","original_commit_id":"72ca0770a17f6c1850c1a938c0c5eca1a6dc3109","user":{"login":"s1monw","id":973334,"avatar_url":"https://avatars.githubusercontent.com/u/973334?v=3","gravatar_id":"","url":"https://api.github.com/users/s1monw","html_url":"https://github.com/s1monw","followers_url":"https://api.github.com/users/s1monw/followers","following_url":"https://api.github.com/users/s1monw/following{/other_user}","gists_url":"https://api.github.com/users/s1monw/gists{/gist_id}","starred_url":"https://api.github.com/users/s1monw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s1monw/subscriptions","organizations_url":"https://api.github.com/users/s1monw/orgs","repos_url":"https://api.github.com/users/s1monw/repos","events_url":"https://api.github.com/users/s1monw/events{/privacy}","received_events_url":"https://api.github.com/users/s1monw/received_events","type":"User","site_admin":false},"body":"this should also be final?","created_at":"2016-09-06T19:41:25Z","updated_at":"2016-09-06T19:41:25Z","html_url":"https://github.com/elastic/elasticsearch/pull/20346#discussion_r77704113","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/20346","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/77704113"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/20346#discussion_r77704113"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/20346"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/20346","id":84181730,"html_url":"https://github.com/elastic/elasticsearch/pull/20346","diff_url":"https://github.com/elastic/elasticsearch/pull/20346.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/20346.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20346","number":20346,"state":"open","locked":false,"title":"Closes #20345 Adds minhash filter for use in Elasticsearch","user":{"login":"softwaredoug","id":629060,"avatar_url":"https://avatars.githubusercontent.com/u/629060?v=3","gravatar_id":"","url":"https://api.github.com/users/softwaredoug","html_url":"https://github.com/softwaredoug","followers_url":"https://api.github.com/users/softwaredoug/followers","following_url":"https://api.github.com/users/softwaredoug/following{/other_user}","gists_url":"https://api.github.com/users/softwaredoug/gists{/gist_id}","starred_url":"https://api.github.com/users/softwaredoug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softwaredoug/subscriptions","organizations_url":"https://api.github.com/users/softwaredoug/orgs","repos_url":"https://api.github.com/users/softwaredoug/repos","events_url":"https://api.github.com/users/softwaredoug/events{/privacy}","received_events_url":"https://api.github.com/users/softwaredoug/received_events","type":"User","site_admin":false},"body":"- Adds minhash token filter, using [minHash token filter](https://issues.apache.org/jira/browse/LUCENE-6968) added to Lucene.\r\n\r\nThe minhash algorithm implements locality-sensitive hashing. Basically, every token is hashed into a hash table. The hash table is then sampled to generate a smaller set of representative tokens.\r\n\r\nThis has several applications\r\n- Dimensionality reduction that preserves information that can be used in similarity calculations. For example, efficient deduplication over large sets of text, more like this, etc.\r\n\r\nThe minhash filter has 4 parameters\r\n- bucket_size (def 512) how many buckets to use in the hash table. Will also be the number of tokens output from the minhash filter. More buckets means slower performance and more space, but greater precision.\r\n- num_hash_tables (def 1). As hash tables are sampled by looking at the first item in the bucket, adding more hash tables will provide added precision\r\n- bucket_depth (def 1). How many items should be stored in each bucket?\r\n- rotation (def true if num_buckets > 1). For any empty buckets, fills them with the contents of the next bucket\r\n\r\nImplementation Notes/Questions\r\n- Are tests needed above the Lucene tests that already exist?\r\n- Do I need to provide documentation as well?\r\n- You'll note the fwd'ing to the Lucene filter factory. This is because of an annoying issue with the MinHashFilter. See this [Lucene issue](https://issues.apache.org/jira/browse/LUCENE-7436)\r\n","created_at":"2016-09-06T19:30:22Z","updated_at":"2016-09-06T19:41:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9192773222d69ca438c4004c7d849f101ae43fc9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/20346/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/20346/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20346/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/72ca0770a17f6c1850c1a938c0c5eca1a6dc3109","head":{"label":"o19s:add-minhash-filter","ref":"add-minhash-filter","sha":"72ca0770a17f6c1850c1a938c0c5eca1a6dc3109","user":{"login":"o19s","id":339001,"avatar_url":"https://avatars.githubusercontent.com/u/339001?v=3","gravatar_id":"","url":"https://api.github.com/users/o19s","html_url":"https://github.com/o19s","followers_url":"https://api.github.com/users/o19s/followers","following_url":"https://api.github.com/users/o19s/following{/other_user}","gists_url":"https://api.github.com/users/o19s/gists{/gist_id}","starred_url":"https://api.github.com/users/o19s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/o19s/subscriptions","organizations_url":"https://api.github.com/users/o19s/orgs","repos_url":"https://api.github.com/users/o19s/repos","events_url":"https://api.github.com/users/o19s/events{/privacy}","received_events_url":"https://api.github.com/users/o19s/received_events","type":"Organization","site_admin":false},"repo":{"id":63965139,"name":"elasticsearch","full_name":"o19s/elasticsearch","owner":{"login":"o19s","id":339001,"avatar_url":"https://avatars.githubusercontent.com/u/339001?v=3","gravatar_id":"","url":"https://api.github.com/users/o19s","html_url":"https://github.com/o19s","followers_url":"https://api.github.com/users/o19s/followers","following_url":"https://api.github.com/users/o19s/following{/other_user}","gists_url":"https://api.github.com/users/o19s/gists{/gist_id}","starred_url":"https://api.github.com/users/o19s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/o19s/subscriptions","organizations_url":"https://api.github.com/users/o19s/orgs","repos_url":"https://api.github.com/users/o19s/repos","events_url":"https://api.github.com/users/o19s/events{/privacy}","received_events_url":"https://api.github.com/users/o19s/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/o19s/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/o19s/elasticsearch","forks_url":"https://api.github.com/repos/o19s/elasticsearch/forks","keys_url":"https://api.github.com/repos/o19s/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/o19s/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/o19s/elasticsearch/teams","hooks_url":"https://api.github.com/repos/o19s/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/o19s/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/o19s/elasticsearch/events","assignees_url":"https://api.github.com/repos/o19s/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/o19s/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/o19s/elasticsearch/tags","blobs_url":"https://api.github.com/repos/o19s/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/o19s/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/o19s/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/o19s/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/o19s/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/o19s/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/o19s/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/o19s/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/o19s/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/o19s/elasticsearch/subscription","commits_url":"https://api.github.com/repos/o19s/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/o19s/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/o19s/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/o19s/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/o19s/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/o19s/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/o19s/elasticsearch/merges","archive_url":"https://api.github.com/repos/o19s/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/o19s/elasticsearch/downloads","issues_url":"https://api.github.com/repos/o19s/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/o19s/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/o19s/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/o19s/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/o19s/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/o19s/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/o19s/elasticsearch/deployments","created_at":"2016-07-22T15:48:58Z","updated_at":"2016-09-06T17:16:06Z","pushed_at":"2016-09-06T17:16:45Z","git_url":"git://github.com/o19s/elasticsearch.git","ssh_url":"git@github.com:o19s/elasticsearch.git","clone_url":"https://github.com/o19s/elasticsearch.git","svn_url":"https://github.com/o19s/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":240534,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"fd3392aef871764d478d7fd39e1a9a9333a93b6d","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/elasticsearch/deployments","created_at":"2010-02-08T13:20:56Z","updated_at":"2016-09-06T17:50:45Z","pushed_at":"2016-09-06T19:30:22Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":345522,"stargazers_count":18288,"watchers_count":18288,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6216,"mirror_url":null,"open_issues_count":1140,"forks":6216,"open_issues":1140,"watchers":18288,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/20346"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/20346"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/20346"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/20346/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/20346/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/20346/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/72ca0770a17f6c1850c1a938c0c5eca1a6dc3109"}}}}
{"actor":{"display_login":"s1monw"}}