KinoSearch::Highlight::Highlighter - create and highlight excerpts


Back to Top


NAME

KinoSearch::Highlight::Highlighter - create and highlight excerpts

Back to Top


SYNOPSIS

    my $highlighter = KinoSearch::Highlight::Highlighter->new(
        excerpt_field  => 'bodytext',
    );
    $hits->create_excerpts( highlighter => $highlighter );

Back to Top


DESCRIPTION

KinoSearch's Highlighter can be used to select a relevant snippet from a document, and to surround search terms with highlighting tags. It handles both stems and phrases correctly and efficiently, using special-purpose data generated at index-time.

Back to Top


METHODS

new

    my $highlighter = KinoSearch::Highlight::Highlighter->new(
        excerpt_field  => 'bodytext', # required
        excerpt_length => 150,        # default: 200
        formatter      => $formatter, # default: SimpleHTMLFormatter
        encoder        => $encoder,   # default: SimpleHTMLEncoder
    );

Constructor. Takes hash-style parameters:

Back to Top


COPYRIGHT

Copyright 2005-2006 Marvin Humphrey

Back to Top


LICENSE, DISCLAIMER, BUGS, etc.

See KinoSearch version 0.15.

Back to Top

 KinoSearch::Highlight::Highlighter - create and highlight excerpts