org.basex.index.ft
Class FTIndex

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

public final class FTIndex
extends java.lang.Object
implements Index

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:

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

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

FTIndex

public FTIndex(Data d)
        throws java.io.IOException
Constructor, initializing the index structure.

Parameters:
d - data reference
Throws:
java.io.IOException - I/O Exception
Method Detail

init

public void init()
Description copied from interface: Index
Initializes the index.

Specified by:
init in interface Index

count

public int count(IndexToken it)
Description copied from interface: Index
Returns the (approximate/estimated) number of hits for the specified token.

Specified by:
count in interface Index
Parameters:
it - token to be found
Returns:
number of hits

iter

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

Specified by:
iter in interface Index
Parameters:
it - token to be found
Returns:
sorted pre values for the token

entries

public EntryIterator entries(IndexEntries entries)
Description copied from interface: Index
Returns all entries that match the specified token.

Specified by:
entries in interface Index
Parameters:
entries - index entries
Returns:
entries

info

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

Specified by:
info in interface Index
Returns:
info

close

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

Specified by:
close in interface Index