mirror of https://github.com/apache/lucene.git
LUCENE-4340: fix compilation.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1381512 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3f9aa4dcbb
commit
2067ce946c
|
@ -28,7 +28,7 @@ public class DefaultBloomFilterFactory extends BloomFilterFactory {
|
||||||
@Override
|
@Override
|
||||||
public FuzzySet getSetForField(SegmentWriteState state,FieldInfo info) {
|
public FuzzySet getSetForField(SegmentWriteState state,FieldInfo info) {
|
||||||
//Assume all of the docs have a unique term (e.g. a primary key) and we hope to maintain a set with 10% of bits set
|
//Assume all of the docs have a unique term (e.g. a primary key) and we hope to maintain a set with 10% of bits set
|
||||||
return FuzzySet.createSetBasedOnQuality(state.segmentInfo.getDocCount(), 0.10f, new MurmurHash2());
|
return FuzzySet.createSetBasedOnQuality(state.segmentInfo.getDocCount(), 0.10f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -130,16 +130,16 @@ public class FuzzySet {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FuzzySet createSetBasedOnMaxMemory(int maxNumBytes, HashFunction hashFunction)
|
public static FuzzySet createSetBasedOnMaxMemory(int maxNumBytes)
|
||||||
{
|
{
|
||||||
int setSize=getNearestSetSize(maxNumBytes);
|
int setSize=getNearestSetSize(maxNumBytes);
|
||||||
return new FuzzySet(new FixedBitSet(setSize+1),setSize,hashFunction);
|
return new FuzzySet(new FixedBitSet(setSize+1),setSize, hashFunctionForVersion(VERSION_CURRENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FuzzySet createSetBasedOnQuality(int maxNumUniqueValues, float desiredMaxSaturation, HashFunction hashFunction)
|
public static FuzzySet createSetBasedOnQuality(int maxNumUniqueValues, float desiredMaxSaturation)
|
||||||
{
|
{
|
||||||
int setSize=getNearestSetSize(maxNumUniqueValues,desiredMaxSaturation);
|
int setSize=getNearestSetSize(maxNumUniqueValues,desiredMaxSaturation);
|
||||||
return new FuzzySet(new FixedBitSet(setSize+1),setSize,hashFunction);
|
return new FuzzySet(new FixedBitSet(setSize+1),setSize, hashFunctionForVersion(VERSION_CURRENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class TestBloomFilteredLucene40Postings extends PostingsFormat {
|
||||||
static class LowMemoryBloomFactory extends BloomFilterFactory {
|
static class LowMemoryBloomFactory extends BloomFilterFactory {
|
||||||
@Override
|
@Override
|
||||||
public FuzzySet getSetForField(SegmentWriteState state,FieldInfo info) {
|
public FuzzySet getSetForField(SegmentWriteState state,FieldInfo info) {
|
||||||
return FuzzySet.createSetBasedOnMaxMemory(1024, new MurmurHash2());
|
return FuzzySet.createSetBasedOnMaxMemory(1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue