public final class DirectPostingsFormat extends PostingsFormat
Lucene84PostingsFormat format for on-disk
storage, but then at read time loads and stores all
terms and postings directly in RAM as byte[], int[].
WARNING: This is exceptionally RAM intensive: it makes no effort to compress the postings data, storing terms as separate byte[] and postings as separate int[], but as a result it gives substantial increase in search performance.
This postings format supports TermsEnum.ord()
and TermsEnum.seekExact(long).
Because this holds all term bytes as a single byte[], you cannot have more than 2.1GB worth of term bytes in a single segment.
EMPTY| Constructor and Description |
|---|
DirectPostingsFormat() |
DirectPostingsFormat(int minSkipCount,
int lowFreqCutoff)
minSkipCount is how many terms in a row must have the
same prefix before we put a skip pointer down.
|
| Modifier and Type | Method and Description |
|---|---|
FieldsConsumer |
fieldsConsumer(SegmentWriteState state) |
FieldsProducer |
fieldsProducer(SegmentReadState state) |
availablePostingsFormats, forName, getName, reloadPostingsFormats, toStringpublic DirectPostingsFormat()
public DirectPostingsFormat(int minSkipCount,
int lowFreqCutoff)
public FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException
fieldsConsumer in class PostingsFormatIOExceptionpublic FieldsProducer fieldsProducer(SegmentReadState state) throws IOException
fieldsProducer in class PostingsFormatIOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.