WebService::Solr::Document(3pm)

WebService::Solr::Document3pm

A document object

Usage

    my $doc = WebService::Solr::Document->new;
    $doc->add_fields( @fields );
    $doc->boost( 2.0 );
    my $id = $doc->value_for( 'id' );
    my @subjects = $doc->values_for( 'subject' );

Overview

This class represents a basic document object, which is basically a collection of fields.

Accessors

•

fields - an array of fields

•

boost - a floating-point "boost" value

Methods

new( @fields|\@fields )

Constructs a new document object given @fields. A field can be a WebService::Solr::Field object, or a structure accepted by "WebService::Solr::Field->new".

BUILDARGS( @args )

A Moose override to allow our custom constructor.

add_fields( @fields|\@fields )

Adds @fields to the document.

field_names

Returns a list of field names that are in this document.

value_for( $name )

Returns the first value for $name.

values_for( $name )

Returns all values for $name.

to_element( )

Serializes the object to an XML::Easy::Element object.

to_xml( )

Serializes the object to xml.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 6 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12–13

Authors

Andy Lester "[email protected]"

Brian Cassidy <[email protected]>

Kirk Beers

From libwebservice-solr-perl 0.44-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.