DOKK / manpages / debian 11 / libwebservice-solr-perl / WebService::Solr::Document.3pm.en
WebService::Solr::Document(3pm) User Contributed Perl Documentation WebService::Solr::Document(3pm)

WebService::Solr::Document - A document object

    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' );

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

  • fields - an array of fields
  • boost - a floating-point "boost" value

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.

Adds @fields to the document.

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

Returns the first value for $name.

Returns all values for $name.

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

Serializes the object to xml.

Andy Lester "andy@petdance.com"

Brian Cassidy <bricas@cpan.org>

Kirk Beers

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.

2020-01-19 perl v5.30.0