KinoSearch::Plan::FullTextType - Full-text search field type.


KinoSearch documentation  | view source Contained in the KinoSearch distribution.

Index


NAME

Top

KinoSearch::Plan::FullTextType - Full-text search field type.

SYNOPSIS

Top

    my $polyanalyzer = KinoSearch::Analysis::PolyAnalyzer->new(
        language => 'en',
    );
    my $type = KinoSearch::Plan::FullTextType->new(
        analyzer => $polyanalyzer,
    );
    my $schema = KinoSearch::Plan::Schema->new;
    $schema->spec_field( name => 'title',   type => $type );
    $schema->spec_field( name => 'content', type => $type );







DESCRIPTION

Top

KinoSearch::Plan::FullTextType is an implementation of KinoSearch::Plan::FieldType tuned for "full text search".

Full text fields are associated with an Analyzer, which is used to tokenize and normalize the text so that it can be searched for individual words.

For an exact-match, single value field type using character data, see StringType.

CONSTRUCTORS

Top

new( [labeled params] )

    my $type = KinoSearch::Plan::FullTextType->new(
        analyzer      => $analyzer,    # required
        boost         => 2.0,          # default: 1.0
        indexed       => 1,            # default: true
        stored        => 1,            # default: true
        sortable      => 1,            # default: false
        highlightable => 1,            # default: false
    );

METHODS

Top

set_highlightable(highlightable)

Indicate whether to store data required by KinoSearch::Highlight::Highlighter for excerpt selection and search term highlighting.

highlightable()

Accessor for "highlightable" property.

INHERITANCE

Top

KinoSearch::Plan::FullTextType isa KinoSearch::Plan::TextType isa KinoSearch::Plan::FieldType isa KinoSearch::Object::Obj.

COPYRIGHT AND LICENSE

Top


KinoSearch documentation  | view source Contained in the KinoSearch distribution.