public class DiskValues extends java.lang.Object implements Index
ValueBuilder class.| Constructor and Description |
|---|
DiskValues(Data d,
boolean txt)
Constructor, initializing the index structure.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the index.
|
int |
count(IndexToken it)
Returns the (approximate/estimated) number of hits for the specified token.
|
void |
delete(TokenObjMap<IntList> m)
Delete records from the index.
|
EntryIterator |
entries(byte[] prefix)
Returns all entries that start with the specified prefix.
|
void |
flush()
Flushes the buffered data.
|
void |
index(TokenObjMap<IntList> m)
Add entries to the index.
|
byte[] |
info()
Returns information on the index structure.
|
IndexIterator |
iter(IndexToken tok)
Returns an iterator for the index results.
|
void |
replace(byte[] o,
byte[] n,
int id)
Remove record from the index.
|
public DiskValues(Data d, boolean txt) throws java.io.IOException
d - data referencetxt - value type (texts/attributes)java.io.IOException - I/O Exceptionpublic byte[] info()
Indexpublic IndexIterator iter(IndexToken tok)
Indexpublic int count(IndexToken it)
Indexpublic EntryIterator entries(byte[] prefix)
Indexpublic void flush()
throws java.io.IOException
java.io.IOException - I/O exceptionpublic void close()
throws java.io.IOException
Indexpublic void index(TokenObjMap<IntList> m)
m - a set of public void delete(TokenObjMap<IntList> m)
m - a set of public void replace(byte[] o,
byte[] n,
int id)
o - old record keyn - new record keyid - record id