WebSer...cument(3pm)
π NAME π
WebService::Solr::Document β it's a document object, bestie. That's the whole vibe. A little container, a glow-up for your fields. π¦
β¨ 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' );
okay so literally five lines and you're already living your best life, no cap π
πΈ DESCRIPTION πΈ
This class is a basic document object, and honestly? A document is basically just a collection of fields. That's it. That's the whole personality. A little group chat of fields, all vibing together in one object. π
π ACCESSORS π
fieldsβ an array of fields. the whole squad, assembled. π«Άboostβ a floating-point "boost" value. yes it's literally called boost. it's giving main character energy and we respect it. β¨
π₯ METHODS π₯
π§ new( @fields|\@fields )
Constructs a new document object, and you hand it @fields. Each field can be a WebService::Solr::Field object, OR a structure that "WebService::Solr::Field->new" would accept. so like, you got options, bestie. flexible queen behavior. π
π« BUILDARGS( @args )
A Moose override β it exists purely so we can do our custom constructor thing. that's it, that's the job. lowkey iconic of it. π
π add_fields( @fields|\@fields )
Adds @fields to the document. boom. more fields. obsessed. π
β field_names
Returns a list of field names that are in this document. like a guest list, but for fields. πβ¨
π value_for( $name )
Returns the first value for $name. just the first one. not all of them. patience, babe. π
π¦ values_for( $name )
Returns all the values for $name. the full haul. every single one. slay. π
π to_element( )
Serializes the object to an XML::Easy::Element object. yeah, it's XML time. glow-up to markup. π₯
π to_xml( )
Serializes the object to xml. that's it. that's the tweet. fr fr. β¨
π«Ά AUTHORS π«Ά
- Andy Lester
"andy@petdance.com" - Brian Cassidy <bricas@cpan.org>
- Kirk Beers
the founding mothers/fathers of this whole situation. we thank them. ππ
π 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.
π so yes, it's free software, same terms as Perl itself β go forth and remix responsibly, bestie.
and that's the whole page!! π this was WebSer...cument(3pm) from the User Contributed Perl Documentation, running on perl v5.36.0, dated 2022-10-16. mwah, bye!! πβ¨π
π¦ where this page comes from
- ubuntu noble: libwebservice-solr-perl 0.44-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libwebservice-solr-perl 0.44-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libwebservice-solr-perl 0.44-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms