public abstract class FilterCodec extends Codec
Extend this class when you need to reuse the functionality of an existing
codec. For example, if you want to build a codec that redefines Lucene40's
LiveDocsFormat:
public final class CustomCodec extends FilterCodec {
public CustomCodec() {
super("CustomCodec", new Lucene40Codec());
}
public LiveDocsFormat liveDocsFormat() {
return new CustomLiveDocsFormat();
}
}
Please note: Don't call Codec.forName(java.lang.String) from
the no-arg constructor of your own codec. When the SPI framework
loads your own Codec as SPI component, SPI has not yet fully initialized!
If you want to extend another Codec, instantiate it directly by calling
its constructor.
| Modifier and Type | Field and Description |
|---|---|
protected Codec |
delegate
The codec to filter.
|
| Modifier | Constructor and Description |
|---|---|
protected |
FilterCodec(String name,
Codec delegate)
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
DocValuesFormat |
docValuesFormat()
Encodes/decodes docvalues
|
FieldInfosFormat |
fieldInfosFormat()
Encodes/decodes field infos file
|
LiveDocsFormat |
liveDocsFormat()
Encodes/decodes live docs
|
NormsFormat |
normsFormat()
Encodes/decodes document normalization values
|
PostingsFormat |
postingsFormat()
Encodes/decodes postings
|
SegmentInfoFormat |
segmentInfoFormat()
Encodes/decodes segment info file
|
StoredFieldsFormat |
storedFieldsFormat()
Encodes/decodes stored fields
|
TermVectorsFormat |
termVectorsFormat()
Encodes/decodes term vectors
|
availableCodecs, forName, getDefault, getName, reloadCodecs, setDefault, toStringprotected final Codec delegate
public DocValuesFormat docValuesFormat()
CodecdocValuesFormat in class Codecpublic FieldInfosFormat fieldInfosFormat()
CodecfieldInfosFormat in class Codecpublic LiveDocsFormat liveDocsFormat()
CodecliveDocsFormat in class Codecpublic NormsFormat normsFormat()
CodecnormsFormat in class Codecpublic PostingsFormat postingsFormat()
CodecpostingsFormat in class Codecpublic SegmentInfoFormat segmentInfoFormat()
CodecsegmentInfoFormat in class Codecpublic StoredFieldsFormat storedFieldsFormat()
CodecstoredFieldsFormat in class Codecpublic TermVectorsFormat termVectorsFormat()
CodectermVectorsFormat in class CodecCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.