Rechercher une page de manuel
WebService::Solr::Document.3pm
Langue: en
Version: 2010-03-17 (ubuntu - 24/10/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
WebService::Solr::Document - A document objectSYNOPSIS
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' );
DESCRIPTION
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.value_for( $name )
Returns the first value for $name.values_for( $name )
Returns all values for $name.to_xml( )
Serializes the object to xml.AUTHORS
Brian Cassidy <bricas@cpan.org>Kirk Beers <kirk.beers@nald.ca>
COPYRIGHT AND LICENSE
Copyright 2008-2010 National Adult Literacy DatabaseThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre