public class BlockTreeTermsReader extends FieldsProducer
NOTE: this terms dictionary does not support index divisor when opening an IndexReader. Instead, you can change the min/maxItemsPerBlock during indexing.
The data structure used by this implementation is very similar to a burst trie (http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.18.3499), but with added logic to break up too-large blocks of all terms sharing a given prefix into smaller ones.
Use CheckIndex
with the -verbose
option to see summary statistics on the blocks in the
dictionary.
See BlockTreeTermsWriter
.
Modifier and Type | Class and Description |
---|---|
class |
BlockTreeTermsReader.FieldReader
BlockTree's implementation of
Terms . |
static class |
BlockTreeTermsReader.Stats
BlockTree statistics for a single field
returned by
BlockTreeTermsReader.FieldReader.computeStats() . |
EMPTY_ARRAY
Constructor and Description |
---|
BlockTreeTermsReader(Directory dir,
FieldInfos fieldInfos,
SegmentInfo info,
PostingsReaderBase postingsReader,
IOContext ioContext,
java.lang.String segmentSuffix,
int indexDivisor)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.util.Iterator<java.lang.String> |
iterator()
Returns an iterator that will step through all fields
names.
|
long |
ramBytesUsed()
Returns approximate RAM bytes used
|
int |
size()
Returns the number of fields or -1 if the number of
distinct field names is unknown.
|
Terms |
terms(java.lang.String field)
Get the
Terms for this field. |
getUniqueTermCount
public BlockTreeTermsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo info, PostingsReaderBase postingsReader, IOContext ioContext, java.lang.String segmentSuffix, int indexDivisor) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class FieldsProducer
java.io.IOException
public java.util.Iterator<java.lang.String> iterator()
Fields
public Terms terms(java.lang.String field) throws java.io.IOException
Fields
Terms
for this field. This will return
null if the field does not exist.public int size()
Fields
Fields.iterator()
will return as many field names.public long ramBytesUsed()
FieldsProducer
ramBytesUsed
in class FieldsProducer
Copyright © 2010 - 2019 Adobe. All Rights Reserved