|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.index.ft.FTIndex
public final class FTIndex
This class provides access to a fuzzy full-text index structure
stored on disk. Each token has an entry in sizes, saving its length and a
pointer on ftdata, where to find the token and its ftdata.
The three database index files start with the prefix
DataText.DATAFTX
and have the following format:
[l, p] ...
l
is the length of a token [byte].p
is the pointer of the first token with length l
[int].
[t0, t1, ... tl, z, s]
t0, t1, ... tl-1
is the token [byte[l]]z
is the pointer on the data entries of the token [long]s
is the number of pre values, saved in data [int]
id/pos
references.
The values are ordered, but not distinct:pre1/pos1, pre2/pos2, pre3/pos3, ...
[Num
]
Constructor Summary | |
---|---|
FTIndex(Data d)
Constructor, initializing the index structure. |
Method Summary | |
---|---|
void |
close()
Closes the index. |
int |
count(IndexToken it)
Returns the (approximate/estimated) number of hits for the specified token. |
EntryIterator |
entries(IndexEntries entries)
Returns all entries that match the specified token. |
byte[] |
info()
Returns information on the index structure. |
void |
init()
Initializes the index. |
IndexIterator |
iter(IndexToken it)
Returns an iterator for the index results. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FTIndex(Data d) throws java.io.IOException
d
- data reference
java.io.IOException
- I/O ExceptionMethod Detail |
---|
public void init()
Index
init
in interface Index
public int count(IndexToken it)
Index
count
in interface Index
it
- token to be found
public IndexIterator iter(IndexToken it)
Index
iter
in interface Index
it
- token to be found
public EntryIterator entries(IndexEntries entries)
Index
entries
in interface Index
entries
- index entries
public byte[] info()
Index
info
in interface Index
public void close()
Index
close
in interface Index
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |