1KinoSearch1::Highlight:U:sHeirghCloingthrtiebru(t3e)d PeKrilnoDSoecaurmcehn1t:a:tHiiognhlight::Highlighter(3)
2
3
4

NAME

6       KinoSearch1::Highlight::Highlighter - create and highlight excerpts
7

SYNOPSIS

9           my $highlighter = KinoSearch1::Highlight::Highlighter->new(
10               excerpt_field  => 'bodytext',
11           );
12           $hits->create_excerpts( highlighter => $highlighter );
13

DESCRIPTION

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

METHODS

21   new
22           my $highlighter = KinoSearch1::Highlight::Highlighter->new(
23               excerpt_field  => 'bodytext', # required
24               excerpt_length => 150,        # default: 200
25               formatter      => $formatter, # default: SimpleHTMLFormatter
26               encoder        => $encoder,   # default: SimpleHTMLEncoder
27           );
28
29       Constructor.  Takes hash-style parameters:
30
31excerpt_field - the name of the field from which to draw the
32           excerpt.  This field must be "vectorized".
33
34excerpt_length - the length of the excerpt, in bytes.  This should
35           probably use characters as a unit instead of bytes, and the
36           behavior is likely to change in the future.
37
38formatter - an object which subclasses
39           KinoSearch1::Highlight::Formatter, used to perform the actual
40           highlighting.
41
42encoder - an object which subclasses
43           KinoSearch1::Highlight::Encoder.  All excerpt text gets passed
44           through the encoder, including highlighted terms.  By default, this
45           is a SimpleHTMLEncoder, which encodes HTML entities.
46
47pre_tag - deprecated.
48
49post_tag - deprecated.
50
52       Copyright 2005-2010 Marvin Humphrey
53

LICENSE, DISCLAIMER, BUGS, etc.

55       See KinoSearch1 version 1.01.
56
57
58
59perl v5.32.1                      2021-01K-i2n7oSearch1::Highlight::Highlighter(3)
Impressum