DESCRIPTION

SWISH::Prog::Aggregator::DBI is a SWISH::Prog::Aggregator subclass designed for providing full-text search for databases.

METHODS

Since SWISH::Prog::Aggregator::DBI inherits from SWISH::Prog::Aggregator, read that documentation first. Any overridden methods are documented here.

new( opts )

Create new aggregator object.

The following opts are required:

db => connect_info

connect_info is passed directly to DBI's connect() method, so see the DBI docs for syntax. If connect_info is a DBI handle object, it is accepted as is. If connect_info is an array ref, it will be dereferenced and passed to connect(). Otherwise it will be passed to connect as is.

schema => db_schema

db_schema is a hashref of table names and column descriptions. Each key should be a table name. Each value should be a hashref of column descriptions, where the key is the column name and the value is a hashref of type and bias. See the SYNOPSIS.

There are two special column names: swishtitle and swishdescription. These are reserved for mapping real column names to Swish-e property names for returning in search results. swishtitle should be the name of a column, and swishdescription should be a hashref of column names to include in the StoreDescription value.

indexer => indexer_obj

A SWISH::Prog::Indexer-derived object.

The following opts are optional:

alias_columns => 0|1

The alias_columns flag indicates whether all columns should be searchable under the default MetaName of swishdefault. The default is 1 (true). This is not the default behaviour of swish-e; this is a feature of SWISH::Prog.

use_quotes

Boolean indicating whether column and table names should be quoted. This is typically DBD-specific (e.g., MySQL requires this be true). Default is true.

quote_char

The character to use when use_quotes is true. Default is ` (backtick).

NOTE: The new() method simply inherits from SWISH::Prog::Aggregator, so any params valid for that method are allowed here.