-
-
27 Feb 2018 08:40:23 UTC
- Distribution: Lucy
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Clone repository
- Issues
- Testers (1251 / 3 / 7)
- Kwalitee
Bus factor: 1- License: apache_2_0
- Perl: v5.8.3
- Activity
24 month- Tools
- Download (1.12MB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- The Apache Lucy Project <dev at lucy dot apache dot org>
- Dependencies
- Clownfish
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Lucy::Plan::FullTextType - Full-text search field type.
SYNOPSIS
my $easyanalyzer = Lucy::Analysis::EasyAnalyzer->new( language => 'en', ); my $type = Lucy::Plan::FullTextType->new( analyzer => $easyanalyzer, ); my $schema = Lucy::Plan::Schema->new; $schema->spec_field( name => 'title', type => $type ); $schema->spec_field( name => 'content', type => $type );
DESCRIPTION
Lucy::Plan::FullTextType is an implementation of 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
new
my $type = Lucy::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 );
analyzer - An Analyzer.
boost - floating point per-field boost.
indexed - boolean indicating whether the field should be indexed.
stored - boolean indicating whether the field should be stored.
sortable - boolean indicating whether the field should be sortable.
highlightable - boolean indicating whether the field should be highlightable.
METHODS
set_highlightable
$full_text_type->set_highlightable($highlightable);
Indicate whether to store data required by Highlighter for excerpt selection and search term highlighting.
highlightable
my $bool = $full_text_type->highlightable();
Accessor for “highlightable” property.
get_analyzer
my $analyzer = $full_text_type->get_analyzer();
Accessor for the type’s analyzer.
INHERITANCE
Lucy::Plan::FullTextType isa Lucy::Plan::TextType isa Lucy::Plan::FieldType isa Clownfish::Obj.
Module Install Instructions
To install Lucy, copy and paste the appropriate command in to your terminal.
cpanm Lucy
perl -MCPAN -e shell install Lucy
For more information on module installation, please visit the detailed CPAN module installation guide.