NAME

WAIT::Table -- Module for maintaining Tables / Relations

SYNOPSIS

require WAIT::Table;

DESCRIPTION

Creating a Table.

The constructor WAIT::Table-<gt>new is normally called via the create_table method of a database handle. This is not enforced, but creating a table doesn not make any sense unless the table is registered by the database because the latter implements persistence of the meta data. Registering is done automatically by letting the database handle create a table.

my $db = create WAIT::Database name => 'sample';
my $tb = $db->create_table (name     => 'test',
                            attr     => ['docid', 'headline'],
                            layout   => $layout,
                            access   => $access,
                           );

The constructor returns a handle for the table. This handle is hidden by the table module, to prevent direct access if called via Table.

access => accesobj

A reference to a acces object for the external parts (attributes) of tuples. As you may remember, the WAIT System does not enforce that objects are completely stored inside the system to avoid duplication. There is no (strong) point in storing all you HTML-Documents inside the system when indexing your WWW-Server.

file => fname

The filename of the records file. Files for indexes will have fname as prefix. Mandatory

name => name

The name of this table. Mandatory

attr => [ attr ... ]

A reference to an array of attribute names. Mandatory

djk => [ attr ... ]

A reference to an array of attribute names which make up the disjointness key. Don't think about it - i's of no use yet;

layout => layoutobj

A reference to an external parser object. Defaults to anew instance of WAIT::Parse::Base

access => accesobj

A reference to a acces object for the external parts of tuples.

Creating an index

$tb->create_index('docid');
create_index

must be called with a list of attributes. This must be a subset of the attributes specified when the table was created. Currently this method must be called before the first tuple is inserted in the table!

Creating an inverted index

$tb->create_inverted_index
  (attribute => 'au',
   pipeline  => ['detex', 'isotr', 'isolc', 'split2', 'stop'],
   predicate => 'plain',
  );
attribute

The attribute to build the index on. This attribute may not be in the set attributes specified when the table was created.

pipeline

A piplines specification is a reference to and array of method names (from package WAIT::Filter) which are to applied in sequence to the contents of the named attribute. The attribute name may not be in the attribute list.

predicate

An indication which predicate the index implements. This may be e.g. 'plain', 'stemming' or 'soundex'. The indicator will be used for query processing. Currently there is no standard set of predicate names. The predicate defaults to the last member of the ppline if omitted.

Currently this method must be called before the first tuple is inserted in the table!

$tb->layout

Returns the reference to the associated parser object.

$tb->fields

Returns the array of attribute names.

$tb->drop

Must be called via WAIT::Database::drop_table

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 160:

'=item' outside of any '=over'

Around line 182:

You forgot a '=back' before '=head2'