DESCRIPTION

Search::Tools is a set of utilities for building search applications. Rather than adhering to a particular search application or framework, the goal of Search::Tools is to provide general-purpose methods for common search application features. Think of Search::Tools like a toolbox rather than a hammer.

Examples include:

Parsing search queries for the meaningful terms

Rich regular expressions for locating terms in the original indexed documents

Contextual snippets showing query terms

Highlighting of terms in context

Spell check terms and suggestions of alternate spellings.

Search::Tools is derived from some of the features in HTML::HiLiter and SWISH::HiLiter, but has been re-written with an eye to accomodating more general purpose features.

METHODS

parser( args )

Returns a Search::Tools::Parser object, passing args to new().

regexp

Deprecated. Use parser() instead.

hiliter( args )

Returns a Search::Tools::HiLiter object, passing args to new().

snipper( args )

Returns a Search::Tools::Snipper object, passing args to new().

transliterate( str )

Same as:

Search::Tools::Transliterate->new()->convert( $str )

spellcheck( args )

Returns a Search::Tools::SpellCheck object, passing args to new().

slurp( filename )

Reads contents of filename into a scalar variable. Similar to File::Slurp, but will handle compressed files (.gz or .bz2) transparently using IO::Uncompress.

FUNCTIONS

describe( object )

XS debugging help. Same as using Devel::Peek.

REQUIREMENTS

Perl 5.8.3 or later is required. This is for full UTF-8 support.

The following non-core CPAN modules are required:

Class::XSAccessor

Search::Query

Data::Dump

Encode

Encoding::FixLatin

Carp

The following CPAN modules are recommended for the full set of features and for performance.

Text::Aspell

See also the specific module documentation for individual requirements.

HISTORY

The public API has changed as of version 0.24. The following classes are now removed: