The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::Lucene::Field - Object to represent a field in a document

SYNOPSIS

    $field = WebService::Lucene::Field->new( {
        name  => 'foo',
        value => 'bar',
        type  => 'text'
    } );
    
    # or via the 'text' method
    $field = WebService::Lucene::Field->text(
        name  => 'foo',
        value => 'bar'
    );

DESCRIPTION

METHODS

new( $options )

Creates a new field object from the options provided.

types( )

Returns the types of fields available.

text( $name => $value )

Create a new text field.

keyword( $name => $value )

Create a new keyword field.

unindexed( $name => $value )

Creates a new unindexed field.

unstored( $name => $value )

Creates a new unstored field.

sorted( $name => $value )

Creates a new sorted field.

_new_as( $type, $name => $value )

A shorter way to generate a field object.

is_stored( )

Will the field be stored in the index?

is_indexed( )

Will the field be indexed?

is_tokenized( )

Will the field be tokenized in the index?

get_info( [$type] )

Returns a hashref of info for the current or specified type.

get_type( $info )

Given a hashref of information (stored, indexed, tokenzied) it will return the type of field.

name( [$name] )

Accessor for the field name.

value( [$value] )

Accessor for the field value.

type( [$type] )

Accessor for the field type.

AUTHORS

  • Brian Cassidy <brian.cassidy@nald.ca>

  • Adam Paynter <adam.paynter@nald.ca>

COPYRIGHT AND LICENSE

Copyright 2006-2009 National Adult Literacy Database

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.