public abstract class PerFieldPostingsFormat extends PostingsFormat
Note, when extending this class, the name (PostingsFormat.getName()) is
written into the index. In order for the field to be read, the
name must resolve to your implementation via PostingsFormat.forName(String).
This method uses Java's
Service Provider Interface to resolve format names.
Files written by each posting format have an additional suffix containing the format name. For example, in a per-field configuration instead of _1.prx filenames would look like _1_Lucene40_0.prx.
ServiceLoader| Modifier and Type | Field and Description |
|---|---|
static String |
PER_FIELD_FORMAT_KEY |
static String |
PER_FIELD_NAME |
static String |
PER_FIELD_SUFFIX_KEY |
EMPTY| Constructor and Description |
|---|
PerFieldPostingsFormat() |
| Modifier and Type | Method and Description |
|---|---|
FieldsConsumer |
fieldsConsumer(SegmentWriteState state)
Writes a new segment
|
FieldsProducer |
fieldsProducer(SegmentReadState state)
Reads a segment.
|
abstract PostingsFormat |
getPostingsFormatForField(String field) |
availablePostingsFormats, forName, getName, reloadPostingsFormats, toStringpublic static final String PER_FIELD_NAME
public static final String PER_FIELD_FORMAT_KEY
public static final String PER_FIELD_SUFFIX_KEY
public FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException
PostingsFormatfieldsConsumer in class PostingsFormatIOExceptionpublic FieldsProducer fieldsProducer(SegmentReadState state) throws IOException
PostingsFormatfieldsProducer in class PostingsFormatIOExceptionpublic abstract PostingsFormat getPostingsFormatForField(String field)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.