class AutoPrefixTermsWriter
extends java.lang.Object
>= min
and <= max
number of terms.Modifier and Type | Class and Description |
---|---|
static class |
AutoPrefixTermsWriter.PrefixTerm
Describes a range of term-space to match, either a simple prefix
(foo*) or a floor-block range of a prefix (e.g.
|
Modifier and Type | Field and Description |
---|---|
private BytesRefBuilder |
lastTerm |
private int |
maxItemsInPrefix |
private int |
minItemsInPrefix |
private java.util.List<java.lang.Object> |
pending |
(package private) java.util.List<AutoPrefixTermsWriter.PrefixTerm> |
prefixes |
private int[] |
prefixStarts |
Constructor and Description |
---|
AutoPrefixTermsWriter(Terms terms,
int minItemsInPrefix,
int maxItemsInPrefix) |
Modifier and Type | Method and Description |
---|---|
(package private) static java.lang.String |
brToString(BytesRef b) |
private void |
pushTerm(BytesRef text)
Pushes the new term to the top of the stack, and writes new blocks.
|
private void |
savePrefix(int prefixLength,
int floorLeadStart,
int floorLeadEnd) |
(package private) void |
savePrefixes(int prefixLength,
int count) |
final java.util.List<AutoPrefixTermsWriter.PrefixTerm> prefixes
private final int minItemsInPrefix
private final int maxItemsInPrefix
private final BytesRefBuilder lastTerm
private int[] prefixStarts
private java.util.List<java.lang.Object> pending
public AutoPrefixTermsWriter(Terms terms, int minItemsInPrefix, int maxItemsInPrefix) throws java.io.IOException
java.io.IOException
static java.lang.String brToString(BytesRef b)
private void pushTerm(BytesRef text) throws java.io.IOException
java.io.IOException
void savePrefixes(int prefixLength, int count) throws java.io.IOException
java.io.IOException
private void savePrefix(int prefixLength, int floorLeadStart, int floorLeadEnd)