|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectNumericFieldData
public class NumericFieldData
Holds numeric data for a field from a Lucene index. Data is cached for a given index reader, to speed access after the initial load.
Field Summary | |
---|---|
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 |
Constructor Summary | |
---|---|
private |
NumericFieldData(IndexReader reader,
String field)
Load data from the given field of the reader, and parse the values as numbers. |
Method Summary | |
---|---|
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)
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static WeakHashMap cache
private IntList docs
private LongList values
Constructor Detail |
---|
private NumericFieldData(IndexReader reader, String field) throws IOException
IOException
Method Detail |
---|
public static NumericFieldData getCachedData(IndexReader reader, String field) throws IOException
reader
- Where to read the tags fromfield
- Which field to read
IOException
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |