|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.codecs.PostingsFormat
org.apache.lucene.codecs.bloom.BloomFilteringPostingsFormat
public class BloomFilteringPostingsFormat
A PostingsFormat
useful for low doc-frequency fields such as primary
keys. Bloom filters are maintained in a ".blm" file which offers "fast-fail"
for reads in segments known to have no record of the key. A choice of
delegate PostingsFormat is used to record all other Postings data.
A choice of BloomFilterFactory
can be passed to tailor Bloom Filter
settings on a per-field basis. The default configuration is
DefaultBloomFilterFactory
which allocates a ~8mb bitset and hashes
values using MurmurHash2
. This should be suitable for most purposes.
The format of the blm file is as follows:
FuzzySet.serialize(DataOutput)
CodecHeader
String
The name of a ServiceProvider registered PostingsFormat
Uint32
Uint32
The number of the
field in this segment
Nested Class Summary | |
---|---|
class |
BloomFilteringPostingsFormat.BloomFilteredFieldsProducer
|
Field Summary | |
---|---|
static String |
BLOOM_CODEC_NAME
|
static int |
BLOOM_CODEC_VERSION
|
Fields inherited from class org.apache.lucene.codecs.PostingsFormat |
---|
EMPTY |
Constructor Summary | |
---|---|
BloomFilteringPostingsFormat()
|
|
BloomFilteringPostingsFormat(PostingsFormat delegatePostingsFormat)
Creates Bloom filters for a selection of fields created in the index. |
|
BloomFilteringPostingsFormat(PostingsFormat delegatePostingsFormat,
BloomFilterFactory bloomFilterFactory)
Creates Bloom filters for a selection of fields created in the index. |
Method Summary | |
---|---|
FieldsConsumer |
fieldsConsumer(SegmentWriteState state)
Writes a new segment |
FieldsProducer |
fieldsProducer(SegmentReadState state)
Reads a segment. |
Methods inherited from class org.apache.lucene.codecs.PostingsFormat |
---|
availablePostingsFormats, forName, getName, reloadPostingsFormats, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String BLOOM_CODEC_NAME
public static final int BLOOM_CODEC_VERSION
Constructor Detail |
---|
public BloomFilteringPostingsFormat(PostingsFormat delegatePostingsFormat, BloomFilterFactory bloomFilterFactory)
delegatePostingsFormat
- The PostingsFormat that records all the non-bloom filter data i.e.
postings info.bloomFilterFactory
- The BloomFilterFactory
responsible for sizing BloomFilters
appropriatelypublic BloomFilteringPostingsFormat(PostingsFormat delegatePostingsFormat)
DefaultBloomFilterFactory
for
configuring per-field BloomFilters.
delegatePostingsFormat
- The PostingsFormat that records all the non-bloom filter data i.e.
postings info.public BloomFilteringPostingsFormat()
Method Detail |
---|
public FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException
PostingsFormat
fieldsConsumer
in class PostingsFormat
IOException
public FieldsProducer fieldsProducer(SegmentReadState state) throws IOException
PostingsFormat
fieldsProducer
in class PostingsFormat
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |