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 Details

    • info

      byte[] info(MainOptions options)
      Returns information on the index structure.
      Parameters:
      options - main options
      Returns:
      info
    • entries

      EntryIterator entries(IndexEntries entries)
      Returns all entries that match the specified token.
      Parameters:
      entries - index entries
      Returns:
      entries
    • iter

      IndexIterator iter(IndexSearch search)
      Returns an iterator for the index results.
      Parameters:
      search - index search definition
      Returns:
      sorted pre values for the token
    • costs

      IndexCosts costs(IndexSearch search)
      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.
      Smaller values are better, a value of zero indicates that no results will be returned.
      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.