1Lucy::Plan::FullTextTypUes(e3rpmC)ontributed Perl DocumeLnutcayt:i:oPnlan::FullTextType(3pm)
2
3
4

NAME

6       Lucy::Plan::FullTextType - Full-text search field type.
7

SYNOPSIS

9           my $easyanalyzer = Lucy::Analysis::EasyAnalyzer->new(
10               language => 'en',
11           );
12           my $type = Lucy::Plan::FullTextType->new(
13               analyzer => $easyanalyzer,
14           );
15           my $schema = Lucy::Plan::Schema->new;
16           $schema->spec_field( name => 'title',   type => $type );
17           $schema->spec_field( name => 'content', type => $type );
18

DESCRIPTION

20       Lucy::Plan::FullTextType is an implementation of FieldType tuned for
21       “full text search”.
22
23       Full text fields are associated with an Analyzer, which is used to
24       tokenize and normalize the text so that it can be searched for
25       individual words.
26
27       For an exact-match, single value field type using character data, see
28       StringType.
29

CONSTRUCTORS

31   new
32           my $type = Lucy::Plan::FullTextType->new(
33               analyzer      => $analyzer,    # required
34               boost         => 2.0,          # default: 1.0
35               indexed       => 1,            # default: true
36               stored        => 1,            # default: true
37               sortable      => 1,            # default: false
38               highlightable => 1,            # default: false
39           );
40
41analyzer - An Analyzer.
42
43boost - floating point per-field boost.
44
45indexed - boolean indicating whether the field should be indexed.
46
47stored - boolean indicating whether the field should be stored.
48
49sortable - boolean indicating whether the field should be sortable.
50
51highlightable - boolean indicating whether the field should be
52           highlightable.
53

METHODS

55   set_highlightable
56           $full_text_type->set_highlightable($highlightable);
57
58       Indicate whether to store data required by Highlighter for excerpt
59       selection and search term highlighting.
60
61   highlightable
62           my $bool = $full_text_type->highlightable();
63
64       Accessor for “highlightable” property.
65
66   get_analyzer
67           my $analyzer = $full_text_type->get_analyzer();
68
69       Accessor for the type’s analyzer.
70

INHERITANCE

72       Lucy::Plan::FullTextType isa Lucy::Plan::TextType isa
73       Lucy::Plan::FieldType isa Clownfish::Obj.
74
75
76
77perl v5.38.0                      2023-07-20     Lucy::Plan::FullTextType(3pm)
Impressum