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


WebService-Lucene documentation  | view source Contained in the WebService-Lucene distribution.

Index


NAME

Top

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

SYNOPSIS

Top

    $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

Top

METHODS

Top

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

Top

* Brian Cassidy <brian.cassidy@nald.ca>
* Adam Paynter <adam.paynter@nald.ca>

COPYRIGHT AND LICENSE

Top


WebService-Lucene documentation  | view source Contained in the WebService-Lucene distribution.