1Lucy::Plan::FullTextTypUes(e3r)Contributed Perl DocumentLautciyo:n:Plan::FullTextType(3)
2
3
4
6 Lucy::Plan::FullTextType - Full-text search field type.
7
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
20 Lucy::Plan::FullTextType is an implementation of FieldType tuned for
21 Xfull text searchX.
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
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
41 • analyzer - An Analyzer.
42
43 • boost - floating point per-field boost.
44
45 • indexed - boolean indicating whether the field should be indexed.
46
47 • stored - boolean indicating whether the field should be stored.
48
49 • sortable - boolean indicating whether the field should be sortable.
50
51 • highlightable - boolean indicating whether the field should be
52 highlightable.
53
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 XhighlightableX property.
65
66 get_analyzer
67 my $analyzer = $full_text_type->get_analyzer();
68
69 Accessor for the typeXs analyzer.
70
72 Lucy::Plan::FullTextType isa Lucy::Plan::TextType isa
73 Lucy::Plan::FieldType isa Clownfish::Obj.
74
75
76
77perl v5.32.1 2021-01-27 Lucy::Plan::FullTextType(3)