From c6ab0e0f1ba03fc74f740c2807acd3bd356090ea Mon Sep 17 00:00:00 2001 From: Mike McCandless Date: Fri, 9 Sep 2016 10:52:37 -0400 Subject: [PATCH] LUCENE-7436: make constructor and default settings public for MinMashFilter --- lucene/CHANGES.txt | 3 +++ .../org/apache/lucene/analysis/minhash/MinHashFilter.java | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 9603ea5d359..1341b738919 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -38,6 +38,9 @@ Other API Changes +* LUCENE-7436: MinHashFilter's constructor, and some of its default + settings, should be public. (Doug Turnbull via Mike McCandless) + New Features Bug Fixes diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilter.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilter.java index 61c816d5640..772f58ad946 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilter.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilter.java @@ -49,11 +49,11 @@ public class MinHashFilter extends TokenFilter { private static final LongPair[] cachedIntHashes = new LongPair[HASH_CACHE_SIZE]; - static final int DEFAULT_HASH_COUNT = 1; + public static final int DEFAULT_HASH_COUNT = 1; - static final int DEFAULT_HASH_SET_SIZE = 1; + public static final int DEFAULT_HASH_SET_SIZE = 1; - static final int DEFAULT_BUCKET_COUNT = 512; + public static final int DEFAULT_BUCKET_COUNT = 512; static final String MIN_HASH_TYPE = "MIN_HASH"; @@ -112,7 +112,7 @@ public class MinHashFilter extends TokenFilter { * @param hashSetSize the no. of min hashes to keep * @param withRotation whether rotate or not hashes while incrementing tokens */ - MinHashFilter(TokenStream input, int hashCount, int bucketCount, int hashSetSize, boolean withRotation) { + public MinHashFilter(TokenStream input, int hashCount, int bucketCount, int hashSetSize, boolean withRotation) { super(input); this.hashCount = hashCount; this.bucketCount = bucketCount;