public class NumericFieldData
extends Object
Modifier and Type | Field and Description |
---|---|
private static WeakHashMap |
cache
Cached data.
|
private IntList |
docs
Document IDs containing values for the field
|
private LongList |
values
Associated numeric value for each document
|
Modifier | Constructor and Description |
---|---|
private |
NumericFieldData(IndexReader reader,
String field)
Load data from the given field of the reader, and parse the values as
numbers.
|
Modifier and Type | Method and Description |
---|---|
int |
doc(int index) |
int |
docPos(int docId) |
int |
findDocIndex(int docId) |
static NumericFieldData |
getCachedData(IndexReader reader,
String field)
Retrieves tags for a given field from a given reader.
|
static long |
parseVal(String str)
Parse the numeric characters of a string, ignoring all non-digits
|
int |
size() |
long |
value(int index) |
private static WeakHashMap cache
private IntList docs
private LongList values
private NumericFieldData(IndexReader reader, String field) throws IOException
IOException
public static NumericFieldData getCachedData(IndexReader reader, String field) throws IOException
reader
- Where to read the tags fromfield
- Which field to readIOException
public static long parseVal(String str)
public final int size()
public final int doc(int index)
public final long value(int index)
public final int findDocIndex(int docId)
public final int docPos(int docId)