=encoding utf8
=head1 NAME
Apache::Solr::JSON - Apache Solr (Lucene) client via JSON
=head1 INHERITANCE
Apache::Solr::JSON
is a Apache::Solr
=head1 SYNOPSIS
my $solr = Apache::Solr::JSON->new(...);
my $solr = Apache::Solr->new(format => 'JSON', ...);
=head1 DESCRIPTION
Implement the Solr client, where the communication is in JSON.
Both the requests and the responses are using JSON syntax, produced by
the JSON distribution (which defaults to JSON::XS when installed)
B<Warning 1:>
Apparently, Perl's JSON implementation does not support the repetition
of keys in one list, but Solr is using that. Care is taken to avoid
these cases.
B<Warning 2:>
In some cases, XML and JSON differ in structure and names in the structure.
In those cases, the XML plan is made leading: the JSON data is transformed
to match the XML.
Extends L<"DESCRIPTION" in Apache::Solr|Apache::Solr/"DESCRIPTION">.
=head1 METHODS
Extends L<"METHODS" in Apache::Solr|Apache::Solr/"METHODS">.
=head2 Constructors
Extends L<"Constructors" in Apache::Solr|Apache::Solr/"Constructors">.
=over 4
=item Apache::Solr::JSON-E<gt>B<new>(%options)
-Option --Defined in --Default
agent Apache::Solr <created internally>
autocommit Apache::Solr true
core Apache::Solr undef
format Apache::Solr 'JSON'
json <created internally>
server Apache::Solr <required>
server_version Apache::Solr <latest>
=over 2
=item agent => LWP::UserAgent object
=item autocommit => BOOLEAN
=item core => NAME
=item format => 'XML'|'JSON'
=item json => JSON object
By default, an JSON object is created for you, in utf8 mode.
=item server => URL
=item server_version => VERSION
=back
=back
=head2 Accessors
Extends L<"Accessors" in Apache::Solr|Apache::Solr/"Accessors">.
=over 4
=item $obj-E<gt>B<agent>()
Inherited, see L<Apache::Solr/"Accessors">
=item $obj-E<gt>B<autocommit>( [BOOLEAN] )
Inherited, see L<Apache::Solr/"Accessors">
=item $obj-E<gt>B<core>( [$core] )
Inherited, see L<Apache::Solr/"Accessors">
=item $obj-E<gt>B<json>()
=item $obj-E<gt>B<server>( [$uri|STRING] )
Inherited, see L<Apache::Solr/"Accessors">
=item $obj-E<gt>B<serverVersion>()
Inherited, see L<Apache::Solr/"Accessors">
=back
=head2 Commands
See F<http://wiki.apache.org/solr/UpdateJSON>
Extends L<"Commands" in Apache::Solr|Apache::Solr/"Commands">.
=head2 Helpers
Extends L<"Helpers" in Apache::Solr|Apache::Solr/"Helpers">.
=over 4
=item $obj-E<gt>B<simpleDocument>( $command, [$attributes, [$content]] )
Construct a simple XML structure.
=item $obj-E<gt>B<simpleUpdate>( $command, $attributes, [$content] )
=back
=head1 DETAILS
Extends L<"DETAILS" in Apache::Solr|Apache::Solr/"DETAILS">.
=head1 SEE ALSO
This module is part of Apache-Solr distribution version 1.02,
built on March 08, 2016. Website: F<http://perl.overmeer.net>
=head1 LICENSE
Copyrights 2012-2016 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See F<http://www.perl.com/perl/misc/Artistic.html>