29 Jun 2009 22:37:41 UTC
- Development release
- Distribution: KinoSearch
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (5)
- Testers (27 / 1 / 6)
- KwaliteeBus factor: 0
- License: perl_5
- Activity24 month
- Download (609.56KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionCREAMYG Marvin Humphreyand 1 contributors
- Marvin Humphrey <marvin at rectangular dot com>
- LICENSE, DISCLAIMER, BUGS, etc.
KinoSearch::Schema - User-created specification for an inverted index.
use KinoSearch::Schema; use KinoSearch::FieldType::FullTextType; use KinoSearch::Analysis::PolyAnalyzer; my $schema = KinoSearch::Schema->new; my $polyanalyzer = KinoSearch::Analysis::PolyAnalyzer->new( language => 'en', ); my $type = KinoSearch::FieldType::FullTextType->new( analyzer => $polyanalyzer, ); $schema->spec_field( name => 'title', type => $type ); $schema->spec_field( name => 'content', type => $type );
A Schema is a blueprint specifying how other entities should interpret the raw data in an inverted index and interact with it. It's akin to an SQL table definition.
Once an actual index has been created using a particular Schema, existing field definitions may not be changed. However, it is possible to add new fields during subsequent indexing sessions.
my $schema = MySchema->new;
Constructor. Takes no arguments.
Define the behavior of a field by associating it with a FieldType.
If this method has already been called for the supplied
field, it will merely test to verify that the supplied FieldType equals() the existing one, then return.
name - The name of the field.
type - A FieldType.
Return the number of fields currently defined.
Return all the Schema's field names.
Return the FieldType for the specified field. If the field can't be found, return undef.
Return the Similarity for the specified field, or undef if either the field can't be found or it isn't associated with a Similarity.
Factory method which returns the Architecture for this index.
Return the Schema instance's internal Architecture object.
Return the Schema instance's internal Similarity object.
KinoSearch::Schema isa KinoSearch::Obj.
Copyright 2005-2009 Marvin Humphrey
See KinoSearch version 0.30.