-
-
10 Jan 2020 19:51:43 UTC
- Distribution: WebService-Solr
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Issues (17)
- Testers (288 / 0 / 0)
- Kwalitee
Bus factor: 2- 92.21% Coverage
- License: perl_5
- Perl: v5.8.0
- Activity
24 month- Tools
- Download (17.19KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Data::Page
- Data::Pageset
- Encode
- JSON::XS
- LWP::UserAgent
- Moo
- Test::Mock::LWP
- Test::More
- Types::Standard
- URI
- XML::Easy
- XML::Simple
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
WebService::Solr::Document - A document object
SYNOPSIS
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 byWebService::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.
AUTHORS
Andy Lester
andy@petdance.com
Brian Cassidy <bricas@cpan.org>
Kirk Beers
COPYRIGHT AND LICENSE
Copyright 2008-2014 National Adult Literacy Database Copyright 2015-2020 Andy Lester
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install WebService::Solr, copy and paste the appropriate command in to your terminal.
cpanm WebService::Solr
perl -MCPAN -e shell install WebService::Solr
For more information on module installation, please visit the detailed CPAN module installation guide.