GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  KINOSEARCH1::HIGHLIGHT::HIGHLIGHTER (3)

.ds Aq ’

NAME

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

CONTENTS

SYNOPSIS



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



DESCRIPTION

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.

METHODS

    new



    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:
o <B>excerpt_fieldB> - the name of the field from which to draw the excerpt. This field <B>mustB> be vectorized.
o <B>excerpt_lengthB> - the length of the excerpt, in bytes. This should probably use characters as a unit instead of bytes, and the behavior is likely to change in the future.
o <B>formatterB> - an object which subclasses KinoSearch1::Highlight::Formatter, used to perform the actual highlighting.
o <B>encoderB> - an object which subclasses KinoSearch1::Highlight::Encoder. All excerpt text gets passed through the encoder, including highlighted terms. By default, this is a SimpleHTMLEncoder, which encodes HTML entities.
o <B>pre_tagB> - deprecated.
o <B>post_tagB> - deprecated.

COPYRIGHT

Copyright 2005-2010 Marvin Humphrey

LICENSE, DISCLAIMER, BUGS, etc.

See KinoSearch1 version 1.01.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 KINOSEARCH1::HIGHLIGHT::HIGHLIGHTER (3) 2016-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.