LUCENE-7436: make constructor and default settings public for MinMashFilter

This commit is contained in:
Mike McCandless 2016-09-09 10:52:37 -04:00
parent 3966f99821
commit c6ab0e0f1b
2 changed files with 7 additions and 4 deletions

View File

@ -38,6 +38,9 @@ Other
API Changes API Changes
* LUCENE-7436: MinHashFilter's constructor, and some of its default
settings, should be public. (Doug Turnbull via Mike McCandless)
New Features New Features
Bug Fixes Bug Fixes

View File

@ -49,11 +49,11 @@ public class MinHashFilter extends TokenFilter {
private static final LongPair[] cachedIntHashes = new LongPair[HASH_CACHE_SIZE]; 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"; 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 hashSetSize the no. of min hashes to keep
* @param withRotation whether rotate or not hashes while incrementing tokens * @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); super(input);
this.hashCount = hashCount; this.hashCount = hashCount;
this.bucketCount = bucketCount; this.bucketCount = bucketCount;