Package org.basex.index
Interface Index
- All Known Implementing Classes:
DiskValues,FTIndex,MemValues,Names,PathIndex,Resources,UpdatableDiskValues,ValueIndex
public interface Index
This interface defines the methods which have to be implemented
by an index structure.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the index.costs(IndexSearch search) Computes costs for performing the specified search.booleandrop()Drops the index.entries(IndexEntries entries) Returns all entries that match the specified token.byte[]info(MainOptions options) Returns information on the index structure.iter(IndexSearch search) Returns an iterator for the index results.
-
Method Details
-
info
Returns information on the index structure.- Parameters:
options- main options- Returns:
- info
-
entries
Returns all entries that match the specified token.- Parameters:
entries- index entries- Returns:
- entries
-
iter
Returns an iterator for the index results.- Parameters:
search- index search definition- Returns:
- sorted pre values for the token
-
costs
Computes costs for performing the specified search. An integer is returned:- A negative value indicates that index access is not possible.
- A value of zero indicates that no results will be returned.
- A small value indicates that index access is fast.
- Parameters:
search- index search definition- Returns:
- cost estimation
-
drop
boolean drop()Drops the index. Also returns true if the index does not exist.- Returns:
- success flag
-
close
void close()Closes the index.
-