org.basex.index
Class FTFuzzy

java.lang.Object
  extended by org.basex.index.FTIndex
      extended by org.basex.index.FTFuzzy
All Implemented Interfaces:
Index

public final class FTFuzzy
extends FTIndex

This class provides access to attribute values and text contents stored on disk. The data is stored in two files, ftdata and sizes. Sizes provides a kind of table of contents, using the first char of a token and a pointer on the data entry. Normally there are chars from a-z and 0-9 and the corresponding pointers on the first entry starting with this char. Each token has an entry in sizes, saving its length and a pointer on ftdata, where to find the token and its ftdata. The structure of li: [l, p] ... where l is the length of a token an p the pointer of the first token with length l; there's an entry for each token length [byte, int] The structure of lt: [t0, t1, ... tl, z, s] ... where t0, t1, ... tl are the byte values of the token (byte[l]); z is the pointer on the data entries of the token (int) and s is the number of pre values, saved in data (int) The structure of dat: [pre0, ..., pres, pos0, pos1, ..., poss] where pre and pos are the ft data [int[]]

Author:
Workgroup DBIS, University of Konstanz 2005-10, ISC License, Sebastian Gath

Method Summary
 void close()
          Closes the index.
 IndexIterator ids(IndexToken ind)
          Returns an iterator for the index results.
 byte[] info()
          Returns information on the index structure.
 int nrIDs(IndexToken ind)
          Returns the (approximate/estimated) number of ids for the specified token.
 
Methods inherited from class org.basex.index.FTIndex
get
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

info

public byte[] info()
Description copied from interface: Index
Returns information on the index structure.

Returns:
info

nrIDs

public int nrIDs(IndexToken ind)
Description copied from interface: Index
Returns the (approximate/estimated) number of ids for the specified token.

Parameters:
ind - token to be found
Returns:
number of ids

ids

public IndexIterator ids(IndexToken ind)
Description copied from interface: Index
Returns an iterator for the index results.

Parameters:
ind - token to be found
Returns:
ids

close

public void close()
           throws IOException
Description copied from interface: Index
Closes the index.

Throws:
IOException - I/O exception