KinoSearch1::Highlight::Highlighter(3pm) | User Contributed Perl Documentation | KinoSearch1::Highlight::Highlighter(3pm) |
KinoSearch1::Highlight::Highlighter - create and highlight excerpts
my $highlighter = KinoSearch1::Highlight::Highlighter->new( excerpt_field => 'bodytext', ); $hits->create_excerpts( highlighter => $highlighter );
KinoSearch1'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.
my $highlighter = KinoSearch1::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:
Copyright 2005-2010 Marvin Humphrey
See KinoSearch1 version 1.01.
2022-10-20 | perl v5.36.0 |